Skip to content

Commit

Permalink
fix: ActionButton not accepting children (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriellsh authored Dec 7, 2020
1 parent 273e8cf commit 92c67d8
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/fuselage/src/components/Button/ActionButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ const getSize = ({ tiny, mini, small }) => {
return 'x20';
};

export const ActionButton = React.forwardRef(({ icon, ...props }, ref) => (
<Button ref={ref} square flexShrink={0} {...props}>
<Icon name={icon} size={getSize(props)} />
</Button>
));
export const ActionButton = React.forwardRef(
({ icon, children, ...props }, ref) => (
<Button ref={ref} square flexShrink={0} {...props}>
{children}
<Icon name={icon} size={getSize(props)} />
</Button>
)
);

0 comments on commit 92c67d8

Please sign in to comment.