diff --git a/components/ActionBar/ActionButton.tsx b/components/ActionBar/ActionButton.tsx index 65f22b35..a01de3c5 100644 --- a/components/ActionBar/ActionButton.tsx +++ b/components/ActionBar/ActionButton.tsx @@ -8,7 +8,7 @@ import { PopoverOpenContext } from "components/Popover"; type ButtonProps = Omit; export const ActionButton = ( - props: ButtonProps & { + _props: ButtonProps & { id?: string; icon: React.ReactNode; label: React.ReactNode; @@ -20,7 +20,18 @@ export const ActionButton = ( labelOnMobile?: boolean; }, ) => { - let { id, icon, label, primary, secondary, nav, ...buttonProps } = props; + let { + id, + icon, + label, + primary, + secondary, + nav, + labelOnMobile, + subtext, + className, + ...buttonProps + } = _props; let sidebar = useContext(SidebarContext); let inOpenPopover = useContext(PopoverOpenContext); useEffect(() => { @@ -31,10 +42,9 @@ export const ActionButton = ( }; } }, [sidebar, inOpenPopover]); - + let showLabelOnMobile = - props.labelOnMobile !== false && - (props.primary || props.secondary || props.nav); + labelOnMobile !== false && (primary || secondary || nav); return (