diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-04-29 12:13:34 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-04-29 18:30:05 +0200 |
| commit | 7e16f500cb7bc0cfd8bafbf6bb1555704f771231 (patch) | |
| tree | bfc2b4a475cb06a787e2c4bdf284165644e82952 /src/components/Buttons/ButtonHelp | |
| parent | 5324664e87bedfaa01ba62c0c847ef5b861e69b3 (diff) | |
chore: remove old pages, components, helpers and types
Since I'm using new components, I will also rewrite the GraphQL queries
so it is easier to start from scratch.
Diffstat (limited to 'src/components/Buttons/ButtonHelp')
| -rw-r--r-- | src/components/Buttons/ButtonHelp/ButtonHelp.module.scss | 52 | ||||
| -rw-r--r-- | src/components/Buttons/ButtonHelp/ButtonHelp.tsx | 42 |
2 files changed, 0 insertions, 94 deletions
diff --git a/src/components/Buttons/ButtonHelp/ButtonHelp.module.scss b/src/components/Buttons/ButtonHelp/ButtonHelp.module.scss deleted file mode 100644 index b2a05d7..0000000 --- a/src/components/Buttons/ButtonHelp/ButtonHelp.module.scss +++ /dev/null @@ -1,52 +0,0 @@ -@use "@styles/abstracts/functions" as fun; -@use "@styles/abstracts/mixins" as mix; - -.icon { - color: var(--color-primary-dark); - font-weight: 600; -} - -.active { - .icon { - color: var(--color-fg-inverted); - } -} - -.wrapper { - width: fun.convert-px(44); - height: fun.convert-px(44); - background: var(--color-bg); - border: fun.convert-px(3) solid var(--color-primary-dark); - border-radius: 50%; - box-shadow: fun.convert-px(1) fun.convert-px(1) 0 0 var(--color-shadow); - transition: all 0.3s ease-in-out 0s; - - @include mix.pointer("fine") { - width: fun.convert-px(30); - height: fun.convert-px(30); - line-height: 1; - } - - &:hover, - &:focus { - border-color: var(--color-primary-light); - color: var(--color-primary-light); - box-shadow: fun.convert-px(1) fun.convert-px(1) fun.convert-px(1) - var(--color-shadow-light), - fun.convert-px(1) fun.convert-px(2) fun.convert-px(2) fun.convert-px(-2) - var(--color-shadow-light), - fun.convert-px(3) fun.convert-px(4) fun.convert-px(5) fun.convert-px(-4) - var(--color-shadow-light), - fun.convert-px(7) fun.convert-px(10) fun.convert-px(12) fun.convert-px(-3) - var(--color-shadow-light); - transform: scale(1.1); - - .icon { - transform: scale(1.1); - } - } - - &.active { - background: var(--color-primary); - } -} diff --git a/src/components/Buttons/ButtonHelp/ButtonHelp.tsx b/src/components/Buttons/ButtonHelp/ButtonHelp.tsx deleted file mode 100644 index 2616a8f..0000000 --- a/src/components/Buttons/ButtonHelp/ButtonHelp.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import { SetStateAction } from 'react'; -import { useIntl } from 'react-intl'; -import styles from './ButtonHelp.module.scss'; - -const ButtonHelp = ({ - showHelp, - setShowHelp, - title, -}: { - showHelp: boolean; - setShowHelp: (value: SetStateAction<boolean>) => void; - title?: string; -}) => { - const intl = useIntl(); - - const handleClick = () => { - setShowHelp((prev) => !prev); - }; - - const activeModifier = showHelp ? styles.active : ''; - - return ( - <button - onClick={handleClick} - title={title} - className={`${styles.wrapper} ${activeModifier}`} - > - <span className={styles.icon} aria-hidden="true"> - ? - </span> - <span className="screen-reader-text"> - {intl.formatMessage({ - defaultMessage: 'Help', - description: 'ButtonHelp: screen reader text', - id: 'oPf+XA', - })} - </span> - </button> - ); -}; - -export default ButtonHelp; |
