Skip to content

Commit

Permalink
Pass through additional className
Browse files Browse the repository at this point in the history
  • Loading branch information
mirka committed Aug 18, 2022
1 parent 15ac97d commit 7a496a4
Showing 1 changed file with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* External dependencies
*/
import classnames from 'classnames';

/**
* WordPress dependencies
*/
Expand All @@ -24,17 +29,26 @@ const TEXT_DECORATIONS = [
/**
* Control to facilitate text decoration selections.
*
* @param {Object} props Component props.
* @param {string} props.value Currently selected text decoration.
* @param {Function} props.onChange Handles change in text decoration selection.
* @param {Object} props Component props.
* @param {string} props.value Currently selected text decoration.
* @param {Function} props.onChange Handles change in text decoration selection.
* @param {string} [props.className] Additional class name to apply.
*
* @return {WPElement} Text decoration control.
*/
export default function TextDecorationControl( { value, onChange, ...props } ) {
export default function TextDecorationControl( {
value,
onChange,
className,
...props
} ) {
return (
<ToggleGroupControl
{ ...props }
className="block-editor-text-decoration-control"
className={ classnames(
'block-editor-text-decoration-control',
className
) }
__experimentalIsIconGroup
label={ __( 'Decoration' ) }
value={ value }
Expand Down

0 comments on commit 7a496a4

Please sign in to comment.