blob: c186d2a13b3fe26071d4f5c9651e4a0da69689bd (
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
 | 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;
 |