Update base button styles

- Use brightness filter for hover/focus styles
- Re-add default active style
This commit is contained in:
jeffvli 2023-10-23 08:24:23 -07:00
parent 244c00c4c6
commit f21b8d6bbd

View file

@ -41,8 +41,7 @@ const StyledButton = styled(MantineButton)<StyledButtonProps>`
&:not([data-disabled])&:hover { &:not([data-disabled])&:hover {
color: ${(props) => `var(--btn-${props.variant}-fg) !important`}; color: ${(props) => `var(--btn-${props.variant}-fg) !important`};
background: ${(props) => `var(--btn-${props.variant}-bg)`}; background: ${(props) => `var(--btn-${props.variant}-bg)`};
background-image: ${(props) => filter: brightness(85%);
props.variant === 'filled' ? 'linear-gradient(rgb(0 0 0/40%) 0 0)' : undefined};
border: ${(props) => `var(--btn-${props.variant}-border-hover)`}; border: ${(props) => `var(--btn-${props.variant}-border-hover)`};
svg { svg {
@ -53,12 +52,7 @@ const StyledButton = styled(MantineButton)<StyledButtonProps>`
&:not([data-disabled])&:focus-visible { &:not([data-disabled])&:focus-visible {
color: ${(props) => `var(--btn-${props.variant}-fg-hover)`}; color: ${(props) => `var(--btn-${props.variant}-fg-hover)`};
background: ${(props) => `var(--btn-${props.variant}-bg)`}; background: ${(props) => `var(--btn-${props.variant}-bg)`};
background-image: ${(props) => filter: brightness(85%);
props.variant === 'filled' ? 'linear-gradient(rgb(0 0 0/40%) 0 0)' : undefined};
}
&:active {
transform: none;
} }
& .mantine-Button-centerLoader { & .mantine-Button-centerLoader {