[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:
Damián Suárez 2024-01-03 08:34:05 -03:00 committed by GitHub
parent ce625318cf
commit 84ed581215
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
[Product Block Editor]: add className prop to ButtonWithDropdownMenu component

View File

@ -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 }

View File

@ -48,5 +48,6 @@ Default.args = {
title: 'Second Menu Item Label',
},
],
className: 'my-custom-classname',
onButtonClick: console.log, // eslint-disable-line no-console
};

View File

@ -47,4 +47,5 @@ export interface ButtonWithDropdownMenuProps {
popoverProps?: popoverProps;
onButtonClick?: () => void;
className?: string;
}