[Product Block Editor]: add className prop to ButtonWithDropdownMenu component (#43136)
* add className to the ButtonWithDropdownMenu cmp * chnagelog * move changelog file location
This commit is contained in:
parent
ce625318cf
commit
84ed581215
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: tweak
|
||||
|
||||
[Product Block Editor]: add className prop to ButtonWithDropdownMenu component
|
|
@ -28,10 +28,13 @@ export const ButtonWithDropdownMenu: React.FC<
|
|||
position: 'bottom left left',
|
||||
offset: 0,
|
||||
},
|
||||
className,
|
||||
} ) => {
|
||||
return (
|
||||
<Flex
|
||||
className="woocommerce-button-with-dropdown-menu"
|
||||
className={ `woocommerce-button-with-dropdown-menu${
|
||||
className?.length ? ' ' + className : ''
|
||||
}` }
|
||||
justify="left"
|
||||
gap={ 0 }
|
||||
expanded={ false }
|
||||
|
|
|
@ -48,5 +48,6 @@ Default.args = {
|
|||
title: 'Second Menu Item Label',
|
||||
},
|
||||
],
|
||||
className: 'my-custom-classname',
|
||||
onButtonClick: console.log, // eslint-disable-line no-console
|
||||
};
|
||||
|
|
|
@ -47,4 +47,5 @@ export interface ButtonWithDropdownMenuProps {
|
|||
|
||||
popoverProps?: popoverProps;
|
||||
onButtonClick?: () => void;
|
||||
className?: string;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue