diff --git a/.changeset/mean-grapes-listen.md b/.changeset/mean-grapes-listen.md new file mode 100644 index 0000000..7e00014 --- /dev/null +++ b/.changeset/mean-grapes-listen.md @@ -0,0 +1,5 @@ +--- +"@sweatpants/react": patch +--- + +Fix selected Button styles diff --git a/libra/components/Button.libra.tsx b/libra/components/Button.libra.tsx index d613cfe..d408c3d 100644 --- a/libra/components/Button.libra.tsx +++ b/libra/components/Button.libra.tsx @@ -14,7 +14,7 @@ directory('Button', () => { className={css({ display: 'flex', gap: '4', - alignItems: 'flex-start' + alignItems: 'flex-start', })} > @@ -107,30 +107,33 @@ directory('Button', () => { const [selected, setSelected] = useState(0); return ( -
- - - - - - - - -
+ +
+ + + + + + + + + +
+
); }); }); diff --git a/packages/react/src/button/Button.tsx b/packages/react/src/button/Button.tsx index d0751e6..5172242 100644 --- a/packages/react/src/button/Button.tsx +++ b/packages/react/src/button/Button.tsx @@ -145,11 +145,13 @@ const styles = cva({ kind: 'neutral', selected: true, css: { - base: { bg: 'blue4', color: 'blue11', borderColor: 'blue8' }, - _dark: { bg: 'blue7', color: 'blue12', borderColor: 'blue9' }, + bg: { base: 'blue4', _dark: 'blue7' }, + color: { base: 'blue11', _dark: 'blue12' }, + borderColor: { base: 'blue8', _dark: 'blue9' }, '&:hover:not(:disabled)': { - base: { bg: 'blue4', color: 'blue11', borderColor: 'blue8' }, - _dark: { bg: 'blue7', color: 'blue12', borderColor: 'blue9' }, + bg: { base: 'blue4', _dark: 'blue7' }, + color: { base: 'blue11', _dark: 'blue12' }, + borderColor: { base: 'blue8', _dark: 'blue9' }, _before: { opacity: '0.05', }, @@ -160,11 +162,13 @@ const styles = cva({ kind: 'bare', selected: true, css: { - base: { bg: 'blue4', color: 'blue11', borderColor: 'blue4' }, - _dark: { bg: 'blue7', color: 'blue12', borderColor: 'blue7' }, + bg: { base: 'blue4', _dark: 'blue7' }, + color: { base: 'blue11', _dark: 'blue12' }, + borderColor: { base: 'blue4', _dark: 'blue7' }, '&:hover:not(:disabled)': { - base: { bg: 'blue4', color: 'blue11', borderColor: 'blue4' }, - _dark: { bg: 'blue7', color: 'blue12', borderColor: 'blue7' }, + bg: { base: 'blue4', _dark: 'blue7' }, + color: { base: 'blue11', _dark: 'blue12' }, + borderColor: { base: 'blue4', _dark: 'blue7' }, _before: { opacity: '0.05', },