diff options
Diffstat (limited to 'src/components/Buttons/Button/Button.tsx')
| -rw-r--r-- | src/components/Buttons/Button/Button.tsx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/components/Buttons/Button/Button.tsx b/src/components/Buttons/Button/Button.tsx new file mode 100644 index 0000000..c186d2a --- /dev/null +++ b/src/components/Buttons/Button/Button.tsx @@ -0,0 +1,31 @@ +import { ReactNode } from 'react'; +import styles from '../Buttons.module.scss'; + +const Button = ({ + children, + clickHandler, + isDisabled = false, + isPrimary = false, +}: { + children: ReactNode; + clickHandler: any; + isDisabled: boolean; + isPrimary?: boolean; +}) => { + const classes = `${styles.btn} ${ + isPrimary ? styles.primary : styles.secondary + }`; + + return ( + <button + className={classes} + type="button" + disabled={isDisabled} + onClick={clickHandler} + > + {children} + </button> + ); +}; + +export default Button; |
