diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-21 18:42:19 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-21 19:24:48 +0200 |
| commit | 4581c262ca06704baaa3c0a172d509207f41f5c3 (patch) | |
| tree | 45ef2fe8eafbcb3c54d7e4bee708299da40c715c /src/components/molecules/buttons/help-button.tsx | |
| parent | 0145e687ccd49da08982f6e281ebcbdcb9ef74a7 (diff) | |
chore: complete Storybook stories
Diffstat (limited to 'src/components/molecules/buttons/help-button.tsx')
| -rw-r--r-- | src/components/molecules/buttons/help-button.tsx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/components/molecules/buttons/help-button.tsx b/src/components/molecules/buttons/help-button.tsx index e351453..ccf1ebd 100644 --- a/src/components/molecules/buttons/help-button.tsx +++ b/src/components/molecules/buttons/help-button.tsx @@ -3,12 +3,7 @@ import { forwardRef, ForwardRefRenderFunction } from 'react'; import { useIntl } from 'react-intl'; import styles from './help-button.module.scss'; -export type HelpButtonProps = Pick<ButtonProps, 'onClick'> & { - /** - * Set additional classnames to the button wrapper. - */ - className?: string; -}; +export type HelpButtonProps = Pick<ButtonProps, 'className' | 'onClick'>; /** * HelpButton component @@ -18,7 +13,7 @@ export type HelpButtonProps = Pick<ButtonProps, 'onClick'> & { const HelpButton: ForwardRefRenderFunction< HTMLButtonElement, HelpButtonProps -> = ({ className = '', onClick }, ref) => { +> = ({ className = '', ...props }, ref) => { const intl = useIntl(); const text = intl.formatMessage({ defaultMessage: 'Help', @@ -29,9 +24,9 @@ const HelpButton: ForwardRefRenderFunction< return ( <Button className={`${styles.btn} ${className}`} - onClick={onClick} ref={ref} shape="circle" + {...props} > <span className="screen-reader-text">{text}</span> <span className={styles.icon}>?</span> |
