From 64689e97eb174b7ed8eefb18fe751402b2cd39c3 Mon Sep 17 00:00:00 2001 From: Daniel Lu Date: Tue, 23 Jun 2026 17:20:48 -0700 Subject: [PATCH] chore: fix React Aria home page "bring your styles" button in light mode (#10242) * chore: fix React Aria home page "bring your styles" button in light mode * fix button color * fix for transparency * add chromatic story for auto * fix chromatic issue * remove static color from original powerset * get rid of color pickers --------- Co-authored-by: Rob Snow --- .../s2/chromatic/Button.stories.tsx | 22 ++++++++++++++++++- packages/@react-spectrum/s2/src/Button.tsx | 14 ++++++++++-- packages/@react-spectrum/s2/stories/utils.tsx | 3 ++- .../dev/s2-docs/pages/react-aria/index.mdx | 6 ++--- packages/dev/s2-docs/src/SettingsProvider.tsx | 15 +++++++++++++ 5 files changed, 53 insertions(+), 7 deletions(-) diff --git a/packages/@react-spectrum/s2/chromatic/Button.stories.tsx b/packages/@react-spectrum/s2/chromatic/Button.stories.tsx index 245573f578e..9df9862775a 100644 --- a/packages/@react-spectrum/s2/chromatic/Button.stories.tsx +++ b/packages/@react-spectrum/s2/chromatic/Button.stories.tsx @@ -50,6 +50,18 @@ let genaiStates = [{isDisabled: true}, {size: ['S', 'M', 'L', 'XL']}]; let genaiCombinations = generatePowerset(genaiStates); +let staticColorAutoStates = [ + {isQuiet: true}, + {isDisabled: true}, + {size: ['S', 'M', 'L', 'XL']}, + {staticColor: ['auto']}, + {variant: ['accent', 'negative', 'primary', 'secondary']} +]; + +let staticColorAutoCombinations = generatePowerset(staticColorAutoStates).filter( + c => c.staticColor != null +); + const Template = (args: ButtonProps & {combos?: any[]}): ReactNode => { let {children, combos = combinations, variant, ...otherArgs} = args; return ( @@ -82,7 +94,11 @@ const Template = (args: ButtonProps & {combos?: any[]}): ReactNode => { ); if (c.staticColor != null) { - return {button}; + return ( + + {button} + + ); } return button; @@ -95,6 +111,10 @@ export const Default: StoryObj = { render: args =>