File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 66 border : none ;
77 border-radius : 5px ;
88 cursor : pointer ;
9- }
109
11- .disabled {
12- cursor : not-allowed ;
13- opacity : 0.6 ;
10+ & :hover {
11+ & :not ([disabled ]) {
12+ background-color : #0056b3 ;
13+ }
14+ }
15+
16+ & :disabled {
17+ cursor : not-allowed ;
18+ opacity : 0.6 ;
19+ }
1420}
Original file line number Diff line number Diff line change 11import React , { ReactNode , MouseEvent } from 'react' ;
2- import cn from 'clsx' ;
32import s from './Button.modules.scss' ;
43
54type ButtonProps = {
@@ -9,7 +8,7 @@ type ButtonProps = {
98} ;
109
1110export const Button = ( { children, onClick, disabled = false } : ButtonProps ) => (
12- < button className = { cn ( s . button , { [ s . disabled ] : disabled } ) } onClick = { onClick } >
11+ < button className = { s . button } onClick = { onClick } disabled = { disabled } >
1312 { children }
1413 </ button >
1514) ;
You can’t perform that action at this time.
0 commit comments