fix(reactions): new toolbar button

This commit is contained in:
Hristo Terezov
2023-03-31 15:36:49 -05:00
parent 17ed45799c
commit 4605a72031
21 changed files with 501 additions and 161 deletions

View File

@@ -35,17 +35,17 @@ type Props = {
/**
* Icon of the button.
*/
icon: Function,
icon?: Function,
/**
* Flag used for disabling the small icon.
*/
iconDisabled: boolean,
iconDisabled?: boolean,
/**
* The ID of the icon button.
*/
iconId: string,
iconId?: string,
/**
* Popover close callback.
@@ -88,6 +88,7 @@ export default function ToolboxButtonWithIconPopup(props: Props) {
ariaHasPopup,
ariaLabel,
children,
disableTouchEvents,
icon,
iconDisabled,
iconId,
@@ -95,9 +96,30 @@ export default function ToolboxButtonWithIconPopup(props: Props) {
onPopoverOpen,
popoverContent,
styles,
trigger,
visible
} = props;
if (!icon) {
return (
<div
className = 'settings-button-container'
styles = { styles }>
<Popover
content = { popoverContent }
disableTouchEvents = { disableTouchEvents }
headingLabel = { ariaLabel }
onPopoverClose = { onPopoverClose }
onPopoverOpen = { onPopoverOpen }
position = 'top'
trigger = { trigger }
visible = { visible }>
{children}
</Popover>
</div>
);
}
const iconProps = {};
if (iconDisabled) {