File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ .button {
2+ width : 100% ;
3+ background-color : var (--violet );
4+ border-radius : 8px ;
5+ font-size : 14px ;
6+ font-weight : 600 ;
7+ color : var (--white );
8+ }
9+
10+ .button : disabled {
11+ background-color : var (--gray-400 );
12+ cursor : auto;
13+ }
Original file line number Diff line number Diff line change 1+ import { ButtonHTMLAttributes , PropsWithChildren } from 'react' ;
2+ import styles from './Button.module.css' ;
3+
4+ interface ButtonProps extends ButtonHTMLAttributes < HTMLButtonElement > {
5+ className ?: string ;
6+ }
7+
8+ export default function Button ( {
9+ className = '' ,
10+ children,
11+ ...props
12+ } : PropsWithChildren < ButtonProps > ) {
13+ return (
14+ < button className = { `${ styles . button } ${ className } ` } { ...props } >
15+ { children }
16+ </ button >
17+ ) ;
18+ }
You can’t perform that action at this time.
0 commit comments