Skip to content

Commit 3e352bf

Browse files
authored
Update gradient buttons so that outline and fill are the same (#7575)
also got rid of weird flashes of color for gradient buttons when transitioning into pending state
1 parent 835f0aa commit 3e352bf

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

packages/@react-spectrum/s2/src/Button.tsx

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ const button = style<ButtonRenderProps & ButtonStyleProps & {isStaticColor: bool
154154
}
155155
},
156156
isDisabled: 'none',
157-
isPending: 'none',
158157
forcedColors: 'none'
159158
},
160159
backgroundColor: {
@@ -179,7 +178,13 @@ const button = style<ButtonRenderProps & ButtonStyleProps & {isStaticColor: bool
179178
isHovered: 'gray-100',
180179
isPressed: 'gray-100',
181180
isFocusVisible: 'gray-100',
182-
isDisabled: 'transparent'
181+
isDisabled: {
182+
default: 'transparent',
183+
variant: {
184+
premium: 'gray-100',
185+
genai: 'gray-100'
186+
}
187+
}
183188
}
184189
},
185190
isStaticColor: {
@@ -188,21 +193,27 @@ const button = style<ButtonRenderProps & ButtonStyleProps & {isStaticColor: bool
188193
variant: {
189194
primary: baseColor('transparent-overlay-800'),
190195
secondary: baseColor('transparent-overlay-100'),
191-
premium: 'gray-800',
192-
genai: 'gray-800'
196+
premium: 'transparent-overlay-100',
197+
genai: 'transparent-overlay-100'
193198
},
194199
isDisabled: 'transparent-overlay-100'
195200
},
196201
outline: {
197202
variant: {
198-
premium: 'gray-800',
199-
genai: 'gray-800'
203+
premium: 'transparent-overlay-100',
204+
genai: 'transparent-overlay-100'
200205
},
201206
default: 'transparent',
202207
isHovered: 'transparent-overlay-100',
203208
isPressed: 'transparent-overlay-100',
204209
isFocusVisible: 'transparent-overlay-100',
205-
isDisabled: 'transparent'
210+
isDisabled: {
211+
default: 'transparent',
212+
variant: {
213+
premium: 'transparent-overlay-100',
214+
genai: 'transparent-overlay-100'
215+
}
216+
}
206217
}
207218
}
208219
},

0 commit comments

Comments
 (0)