File size: 1,084 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
36
37
38
39
40
41
42
43
44
"use client"

import {
  Center,
  SimpleGrid,
  Stack,
  Text,
  VStack,
  defaultSystem,
} from "@chakra-ui/react"
import { TokenDoc } from "./token-doc"

const { tokens } = defaultSystem

const aspectRatios = tokens.categoryMap.get("aspectRatios")!
const allAspectRatios = Array.from(aspectRatios.values())

export const AspectRatioTokenDoc = () => {
  return (
    <TokenDoc title="theme.tokens.aspectRatios" mt="8">
      <SimpleGrid minChildWidth="160px" gap="8" fontSize="sm">
        {allAspectRatios.map((token) => {
          return (
            <Stack key={token.name} flex="1">
              <Center
                aspectRatio={token.value}
                width="40"
                bg="bg.subtle"
                color="fg.muted"
                borderWidth="1px"
              >
                <VStack gap="0">
                  <Text>{token.extensions.prop}</Text>
                  <Text color="fg.subtle">{token.value}</Text>
                </VStack>
              </Center>
            </Stack>
          )
        })}
      </SimpleGrid>
    </TokenDoc>
  )
}