blob: 86e0e5bdcc2db5afd872e509f3b0b7d06b1297bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
import { ButtonKind, ButtonPosition } from '@ts/types/app';
import { ReactNode } from 'react';
import styles from '../Buttons.module.scss';
const Button = ({
children,
clickHandler,
kind = 'secondary',
position = 'left',
isDisabled = false,
}: {
children: ReactNode;
clickHandler: any;
kind?: ButtonKind;
position?: ButtonPosition;
isDisabled?: boolean;
}) => {
const classes = `${styles.btn} ${styles[position]} ${styles[kind]}`;
return (
<button
className={classes}
type="button"
disabled={isDisabled}
onClick={clickHandler}
>
{children}
</button>
);
};
export default Button;
|