From 0a954547b2bb8136c97f3a697274319751e046ed Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 5 Jan 2022 12:00:43 +0100 Subject: chore: replace theme button with settings I plan to add more user settings so theme options should be inside settings. --- .../Buttons/ButtonToolbar/ButtonToolbar.tsx | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/components/Buttons/ButtonToolbar/ButtonToolbar.tsx (limited to 'src/components/Buttons/ButtonToolbar/ButtonToolbar.tsx') diff --git a/src/components/Buttons/ButtonToolbar/ButtonToolbar.tsx b/src/components/Buttons/ButtonToolbar/ButtonToolbar.tsx new file mode 100644 index 0000000..22da133 --- /dev/null +++ b/src/components/Buttons/ButtonToolbar/ButtonToolbar.tsx @@ -0,0 +1,45 @@ +import { CloseIcon, CogIcon, SearchIcon } from '@components/Icons'; +import { t } from '@lingui/macro'; +import { SetStateAction } from 'react'; +import styles from '../Buttons.module.scss'; + +type ButtonType = 'search' | 'settings'; + +const ButtonToolbar = ({ + type, + isActivated, + setIsActivated, +}: { + type: ButtonType; + isActivated: boolean; + setIsActivated: (value: SetStateAction) => void; +}) => { + const ButtonIcon = () => (type === 'search' ? : ); + const btnClasses = isActivated + ? `${styles.toolbar} ${styles['toolbar--activated']}` + : styles.toolbar; + + return ( + + ); +}; + +export default ButtonToolbar; -- cgit v1.2.3