Skip to content

Commit ef22355

Browse files
committed
fix multiple layout styles
1 parent c41350a commit ef22355

File tree

1 file changed

+10
-13
lines changed
  • src/components/Staking/StakingConsiderations

1 file changed

+10
-13
lines changed

src/components/Staking/StakingConsiderations/index.tsx

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import Translation from "@/components/Translation"
1010
import { Flex, VStack } from "@/components/ui/flex"
1111
import { List, ListItem } from "@/components/ui/list"
1212

13+
import { cn } from "@/lib/utils/cn"
1314
import { trackCustomEvent } from "@/lib/utils/matomo"
1415

1516
import { useStakingConsiderations } from "@/hooks/useStakingConsiderations"
@@ -35,7 +36,7 @@ const IndicatorGroup = ({
3536
return <WarningProductGlyphIcon style={style} />
3637
}
3738
return (
38-
<VStack className="flex-1 p-2">
39+
<VStack className="flex-1 gap-2">
3940
<IndicatorIcon style={styleObj} />
4041
<p className="max-w-[10rem] text-center text-xs">
4142
<Translation id={label} />
@@ -63,12 +64,6 @@ const StakingConsiderations = ({ page }: StakingConsiderationsProps) => {
6364
activeIndex,
6465
} = useStakingConsiderations({ page })
6566

66-
const activeStyles = {
67-
bg: "background.highlight",
68-
color: "body.base",
69-
transition: "background 0.5s, color 0.5s",
70-
}
71-
7267
return (
7368
<Flex className="flex-col md:flex-row">
7469
<ButtonDropdown list={dropdownLinks} className="mb-4 md:hidden" />
@@ -84,20 +79,22 @@ const StakingConsiderations = ({ page }: StakingConsiderationsProps) => {
8479
handleSelection(idx)
8580
trackCustomEvent(matomo)
8681
}}
87-
className={`relative mb-0 table h-8 w-full cursor-pointer p-3 py-1 hover:[${activeStyles}]`}
88-
{...(idx === activeIndex
89-
? activeStyles
90-
: { color: "primary.base" })}
82+
className={cn(
83+
"transition-background relative mb-0 table h-8 w-full cursor-pointer p-3 duration-500 hover:bg-background-highlight hover:text-body",
84+
idx === activeIndex
85+
? "bg-background-highlight text-body"
86+
: "text-primary"
87+
)}
9188
>
9289
{title}
9390
</ListItem>
9491
))}
9592
</List>
9693
)}
9794
</div>
98-
<Flex className="felx-col bg-highlight flex-2 min-h-[410px] items-center p-6">
95+
<Flex className="min-h-[410px] flex-[2] flex-col items-center bg-background-highlight p-6">
9996
<StyledSvg />
100-
<h3 className="mt-10 text-[27px] font-bold leading-[1.4]">{title}</h3>
97+
<h3 className="mt-10 text-2xl font-bold leading-[1.4]">{title}</h3>
10198
<p>{description}</p>
10299
<Flex className="mt-auto justify-center gap-8">
103100
{!!valid && (

0 commit comments

Comments
 (0)