File size: 1,001 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
"use client"
import { Box, SimpleGrid, Stack, Text, defaultSystem } from "@chakra-ui/react"
import { TokenDoc } from "./token-doc"
const { tokens } = defaultSystem
const easings = tokens.categoryMap.get("easings")!
const allEasings = Array.from(easings.values())
export const EasingTokenDoc = () => {
return (
<TokenDoc title="theme.tokens.easings" mt="8">
<SimpleGrid columns={2} gap="8" fontSize="sm">
{allEasings.map((token) => {
return (
<Stack key={token.name}>
<Box
boxSize="200px"
bg="pink.200"
animationName="slide-to-right-full"
animationTimingFunction={token.value}
animationDuration="1s"
animationIterationCount="infinite"
animationDirection="alternate"
/>
<Text fontWeight="medium">{token.name}</Text>
</Stack>
)
})}
</SimpleGrid>
</TokenDoc>
)
}
|