summaryrefslogtreecommitdiff
path: root/src/components/Button.tsx
blob: 5fd69b2acd14c6846fb4838bf421035d1e6e2ca5 (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
import React from 'react';

interface Props {
  variant?: 'contained' | 'outlined'
  children: string;
}


const styles = {
  contained: 'bg-black text-white',
  outlined: 'border-2 border-black',
};

const Button: React.FC<Props> = ({ children, variant = 'contained' }) => {
  return (
    <button
      type="button"
      className={`p-4 m-3 font-bold tracking-wide hover:underline focus:outline-none ${styles[variant]}`}
    >
      {children}
    </button>
  );
};

export default Button;