@@ -8,7 +8,7 @@ import { common, createCssVariables, createVariants } from '../styledSystem';
8
8
import { applyDataStateProps } from './applyDataStateProps' ;
9
9
import { Flex } from './Flex' ;
10
10
11
- const vars = createCssVariables ( 'accent' , 'accentDark ' , 'accentContrast' , 'alpha' , 'border' ) ;
11
+ const vars = createCssVariables ( 'accent' , 'accentHover ' , 'accentContrast' , 'alpha' , 'border' ) ;
12
12
13
13
const { applyVariants, filterProps } = createVariants (
14
14
( theme , props : OwnProps & { colorScheme ?: 'primary' | 'neutral' | 'danger' } ) => {
@@ -49,21 +49,21 @@ const { applyVariants, filterProps } = createVariants(
49
49
colorScheme : {
50
50
primary : {
51
51
[ vars . accent ] : theme . colors . $primary500 ,
52
- [ vars . accentDark ] : theme . colors . $primary600 ,
52
+ [ vars . accentHover ] : theme . colors . $primaryHover ,
53
53
[ vars . border ] : theme . colors . $primary500 ,
54
54
[ vars . accentContrast ] : theme . colors . $colorTextOnPrimaryBackground ,
55
55
[ vars . alpha ] : theme . colors . $neutralAlpha50 ,
56
56
} ,
57
57
neutral : {
58
58
[ vars . accent ] : theme . colors . $neutralAlpha600 ,
59
- [ vars . accentDark ] : theme . colors . $neutralAlpha700 ,
59
+ [ vars . accentHover ] : theme . colors . $neutralAlpha700 ,
60
60
[ vars . border ] : theme . colors . $neutralAlpha200 ,
61
61
[ vars . accentContrast ] : theme . colors . $white ,
62
62
[ vars . alpha ] : theme . colors . $neutralAlpha50 ,
63
63
} ,
64
64
danger : {
65
65
[ vars . accent ] : theme . colors . $danger500 ,
66
- [ vars . accentDark ] : theme . colors . $danger600 ,
66
+ [ vars . accentHover ] : theme . colors . $danger600 ,
67
67
[ vars . accentContrast ] : theme . colors . $white ,
68
68
[ vars . border ] : theme . colors . $danger500 ,
69
69
[ vars . alpha ] : theme . colors . $dangerAlpha50 ,
@@ -76,23 +76,14 @@ const { applyVariants, filterProps } = createVariants(
76
76
boxShadow : theme . shadows . $buttonShadow ,
77
77
border : theme . borders . $normal ,
78
78
borderColor : vars . accent ,
79
- ':after' : {
80
- position : 'absolute' ,
81
- content : '""' ,
82
- borderRadius : 'inherit' ,
83
- zIndex : - 1 ,
84
- inset : 0 ,
85
- opacity : 1 ,
86
- transitionProperty : theme . transitionProperty . $common ,
87
- transitionDuration : theme . transitionDuration . $controls ,
88
- background : `linear-gradient(180deg, ${ theme . colors . $whiteAlpha150 } 0%, ${ theme . colors . $transparent } 100%)` ,
89
- } ,
90
- ':hover::after' : {
91
- opacity : 0 ,
92
- } ,
93
- ':active::after' : {
94
- opacity : 1 ,
79
+ '&:hover' : {
80
+ backgroundColor : vars . accentHover ,
95
81
} ,
82
+ '&:focus' : props . hoverAsFocus
83
+ ? {
84
+ backgroundColor : vars . accentHover ,
85
+ }
86
+ : undefined ,
96
87
} ,
97
88
outline : {
98
89
border : theme . borders . $normal ,
@@ -104,8 +95,8 @@ const { applyVariants, filterProps } = createVariants(
104
95
} ,
105
96
ghost : {
106
97
color : vars . accent ,
107
- '&:hover' : { backgroundColor : vars . alpha , color : vars . accentDark } ,
108
- '&:focus' : props . hoverAsFocus ? { backgroundColor : vars . alpha , color : vars . accentDark } : undefined ,
98
+ '&:hover' : { backgroundColor : vars . alpha , color : vars . accentHover } ,
99
+ '&:focus' : props . hoverAsFocus ? { backgroundColor : vars . alpha , color : vars . accentHover } : undefined ,
109
100
} ,
110
101
link : {
111
102
minHeight : 'fit-content' ,
@@ -259,7 +250,8 @@ const SimpleButton = React.forwardRef<HTMLButtonElement, ButtonProps>((props, re
259
250
onClick = { onClick }
260
251
css = { applyVariants ( parsedProps ) as any }
261
252
disabled = { isDisabled }
262
- data-variant = { props . variant || 'primary' }
253
+ data-variant = { props . variant || 'solid' }
254
+ data-color = { props . colorScheme || 'primary' }
263
255
ref = { ref }
264
256
>
265
257
{ children }
0 commit comments