Skip to content

Commit

Permalink
fix(staking): base button colors not taking effect
Browse files Browse the repository at this point in the history
  • Loading branch information
yyyyaaa committed Feb 5, 2024
1 parent 3071c93 commit 615bb01
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
4 changes: 4 additions & 0 deletions src/ui/liquid-staking/liquid-staking.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
createContainer,
keyframes,
} from "@vanilla-extract/css";
import { baseButton } from "../button/button.css";
import { themeVars } from "../../styles/themes.css";

const EXPANDED_HEIGHT_PX = `458px`;
Expand Down Expand Up @@ -58,6 +59,7 @@ export const accordionPanel = styleVariants({
const headerButtonBase = style({
color: `${textButtonColorVar} !important`,
backgroundColor: `${textButtonBgVar} !important`,
borderRadius: themeVars.radii.base,
selectors: {
"&:hover": {
opacity: 0.89,
Expand All @@ -67,6 +69,7 @@ const headerButtonBase = style({

export const headerButton = styleVariants({
light: [
baseButton,
headerButtonBase,
style({
vars: {
Expand All @@ -76,6 +79,7 @@ export const headerButton = styleVariants({
}),
],
dark: [
baseButton,
headerButtonBase,
style({
vars: {
Expand Down
22 changes: 12 additions & 10 deletions src/ui/liquid-staking/liquid-staking.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,33 +267,35 @@ export default function LiquidStaking(props: LiquidStakingProps) {
flexShrink: "1",
}}
>
<Button
variant="unstyled"
<Box
as="button"
className={styles.headerButton[state.theme]}
size="xs"
onClick={() => state.handleStakeHalf()}
attributes={{
onClick: () => state.handleStakeHalf(),
}}
>
<Box
as="span"
fontSize={state.isSmallSize() ? "$2xs" : "$sm"}
>
{props.halfButtonLabel}
</Box>
</Button>
</Box>

<Button
variant="unstyled"
<Box
as="button"
className={styles.headerButton[state.theme]}
size="xs"
onClick={() => state.handleStakeMax()}
attributes={{
onClick: () => state.handleStakeMax(),
}}
>
<Box
as="span"
fontSize={state.isSmallSize() ? "$2xs" : "$sm"}
>
{props.maxButtonLabel}
</Box>
</Button>
</Box>
</Stack>
</Stack>
</Stack>
Expand Down

0 comments on commit 615bb01

Please sign in to comment.