aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/buttons/help-button.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-10-04 15:06:29 +0200
committerArmand Philippot <git@armandphilippot.com>2023-11-11 18:14:41 +0100
commite97325a2c174a87c29593d1b42b9a1cc1eaf11af (patch)
tree8bc2f9bd386512350ef596729dae1a9b14b7f3fd /src/components/molecules/buttons/help-button.tsx
parent9eeb49155e2e74df4d5cb2833da20669b85fafe5 (diff)
refactor(components): rewrite HelpButton component
Diffstat (limited to 'src/components/molecules/buttons/help-button.tsx')
-rw-r--r--src/components/molecules/buttons/help-button.tsx40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/components/molecules/buttons/help-button.tsx b/src/components/molecules/buttons/help-button.tsx
deleted file mode 100644
index 7a01b14..0000000
--- a/src/components/molecules/buttons/help-button.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import { forwardRef, type ForwardRefRenderFunction } from 'react';
-import { useIntl } from 'react-intl';
-import { Button, type ButtonProps } from '../../atoms';
-import styles from './help-button.module.scss';
-
-export type HelpButtonProps = Pick<
- ButtonProps,
- 'className' | 'isPressed' | 'onClick'
->;
-
-const HelpButtonWithRef: ForwardRefRenderFunction<
- HTMLButtonElement,
- HelpButtonProps
-> = ({ className = '', ...props }, ref) => {
- const intl = useIntl();
- const text = intl.formatMessage({
- defaultMessage: 'Help',
- id: 'i+/ckF',
- description: 'HelpButton: screen reader text',
- });
-
- return (
- <Button
- className={`${styles.btn} ${className}`}
- ref={ref}
- shape="circle"
- {...props}
- >
- <span className="screen-reader-text">{text}</span>
- <span className={styles.icon}>?</span>
- </Button>
- );
-};
-
-/**
- * HelpButton component
- *
- * Render a button with an interrogation mark icon.
- */
-export const HelpButton = forwardRef(HelpButtonWithRef);