Skip to content

Commit

Permalink
Merge pull request #39 from pantkunalkp/button
Browse files Browse the repository at this point in the history
fix:neutral 100
  • Loading branch information
navneetlal committed Dec 13, 2022
2 parents 924449e + 1692869 commit 374b2e4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions src/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,11 @@ export const ButtonRoot = styled("button", {
"&:hover":
theme.variants[`${ownerState.variant!}Hover`]?.[ownerState.color!],
},
{
"&:active":
theme.variants[`${ownerState.variant!}Active`]?.[ownerState.color!],
},
//don't remove this code
// {
// "&:active":
// theme.variants[`${ownerState.variant!}Active`]?.[ownerState.color!],
// },
{
[`&.${buttonClasses.disabled}`]:
theme.variants[`${ownerState.variant!}Disabled`]?.[ownerState.color!],
Expand Down
6 changes: 3 additions & 3 deletions src/styles/ColorInversion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ interface ColorInversionProviderProps {
variant?: VariantProp;
}

export const ColorInversionProvider = ({
export function ColorInversionProvider({
children,
variant,
}: ColorInversionProviderProps) => {
}: ColorInversionProviderProps) {
const theme = useSystemTheme(defaultTheme);
return (
<VariantOverride.Provider
Expand All @@ -43,6 +43,6 @@ export const ColorInversionProvider = ({
{children}
</VariantOverride.Provider>
);
};
}

export default VariantOverride;
1 change: 1 addition & 0 deletions src/styles/CssVarsProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const shouldSkipGeneratingVar = (keys: string[]) =>
!!keys[0].match(
/^(typography|variants|breakpoints|colorInversion|colorInversionConfig)$/
) ||
(keys[0] === "palette" && !!keys[1]?.match(/^(mode)$/)) ||
(keys[0] === "focus" && keys[1] !== "thickness");

const { CssVarsProvider, useColorScheme, getInitColorSchemeScript } =
Expand Down
2 changes: 1 addition & 1 deletion src/styles/extendTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export default function extendTheme(themeOptions?: CssVarsThemeOptions): Theme {
softDisabledBg: getCssVar(`palette-neutral-50`),

solidColor: getCssVar(`palette-common-white`),
solidBg: getCssVar(`palette-neutral-100`), //600
solidBg: getCssVar(`palette-neutral-600`), //600
solidHoverBg: getCssVar(`palette-neutral-700`),
solidActiveBg: getCssVar(`palette-neutral-800`),
solidDisabledColor: getCssVar(`palette-neutral-300`),
Expand Down

0 comments on commit 374b2e4

Please sign in to comment.