diff --git a/src/components/Staking/StakingConsiderations/index.tsx b/src/components/Staking/StakingConsiderations/index.tsx index ed0f0d9b1ef..74e1259def8 100644 --- a/src/components/Staking/StakingConsiderations/index.tsx +++ b/src/components/Staking/StakingConsiderations/index.tsx @@ -1,5 +1,3 @@ -import { Box, Flex, List, ListItem, useToken, VStack } from "@chakra-ui/react" - import type { StakingPage } from "@/lib/types" import ButtonDropdown from "@/components/ButtonDropdown" @@ -8,10 +6,11 @@ import { GreenCheckProductGlyphIcon, WarningProductGlyphIcon, } from "@/components/icons/staking" -import OldHeading from "@/components/OldHeading" -import Text from "@/components/OldText" import Translation from "@/components/Translation" +import { Flex, VStack } from "@/components/ui/flex" +import { List, ListItem } from "@/components/ui/list" +import { cn } from "@/lib/utils/cn" import { trackCustomEvent } from "@/lib/utils/matomo" import { useStakingConsiderations } from "@/hooks/useStakingConsiderations" @@ -37,11 +36,11 @@ const IndicatorGroup = ({ return } return ( - + - +

- +

) } @@ -51,9 +50,6 @@ export type StakingConsiderationsProps = { } const StakingConsiderations = ({ page }: StakingConsiderationsProps) => { - // TODO: Replace with direct token implementation after UI migration is completed - const mdBp = useToken("breakpoints", "md") - const { StyledSvg, caution, @@ -68,19 +64,13 @@ const StakingConsiderations = ({ page }: StakingConsiderationsProps) => { activeIndex, } = useStakingConsiderations({ page }) - const activeStyles = { - bg: "background.highlight", - color: "body.base", - transition: "background 0.5s, color 0.5s", - } - return ( - + {/* TODO: Improve a11y */} - +
{!!pageData && ( - + {/* TODO: Make mobile responsive */} {pageData.map(({ title, matomo }, idx) => ( { handleSelection(idx) trackCustomEvent(matomo) }} - py={1} - cursor="pointer" - display="table" - w="full" - h={8} - p="3" - mb="0" - _hover={activeStyles} - position="relative" - {...(idx === activeIndex - ? activeStyles - : { color: "primary.base" })} + className={cn( + "transition-background relative mb-0 table h-8 w-full cursor-pointer p-3 duration-500 hover:bg-background-highlight hover:text-body", + idx === activeIndex + ? "bg-background-highlight text-body" + : "text-primary" + )} > {title} ))} )} - - +
+ - - {title} - - {description} - +

{title}

+

{description}

+ {!!valid && (