File size: 3,122 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import {
  BlitzHeading,
  HighlightHeading,
  Subheading,
} from "@/components/site/typography"
import { Box, Container, List, Span, Stack, Tabs } from "@chakra-ui/react"
import { LuBox, LuPaintBucket, LuType } from "react-icons/lu"
import { ExampleCode, ExampleCodeWrapper } from "../example"

const items = [
  {
    icon: <LuBox />,
    value: "site/design-tokens",
    label: "Tokens",
    description: "Streamline design decisions with semantic tokens",
  },
  {
    icon: <LuType />,
    value: "site/typography",
    label: "Typography",
    description: "Customise your font related properties in one place",
  },
  {
    icon: <LuPaintBucket />,
    value: "site/recipes",
    label: "Recipes",
    description: "Design components variants with ease",
  },
]

export const DesignSystemSection = () => {
  return (
    <Box as="section" py="20">
      <Container>
        <Stack
          gap={{ base: "10", md: "20" }}
          direction={{ base: "column", md: "row" }}
        >
          <Stack align="flex-start" gap="4" flex="1" maxW="576px">
            <BlitzHeading my="4">Design System</BlitzHeading>
            <HighlightHeading query="Chakra UI" as="h2">
              Build your design system on top of Chakra UI
            </HighlightHeading>
            <Subheading textStyle="lg">
              Spend less time writing UI code and more time building a great
              experience for your customers.
            </Subheading>
            <List.Root variant="plain" align="start" gap="6" mt="4">
              {items.map((item) => (
                <List.Item key={item.value} gap="2">
                  <List.Indicator asChild>{item.icon}</List.Indicator>
                  <p>
                    {item.label}.{" "}
                    <Span color="fg.muted">{item.description}</Span>
                  </p>
                </List.Item>
              ))}
            </List.Root>
          </Stack>

          <Box flex="1" className="dark" flexShrink="0">
            <Tabs.Root
              rounded="lg"
              p="2"
              defaultValue={items[0].value}
              variant="subtle"
              shadow="inset"
              flex="1"
              bg="bg"
            >
              <Tabs.List p="2">
                {items.map((item) => (
                  <Tabs.Trigger key={item.value} value={item.value}>
                    {item.icon}
                    {item.label}
                  </Tabs.Trigger>
                ))}
              </Tabs.List>
              <Tabs.ContentGroup mt="2">
                {items.map((item) => (
                  <Tabs.Content key={item.value} value={item.value}>
                    <ExampleCodeWrapper bg="bg!" px="4" py="4">
                      <ExampleCode
                        name={item.value}
                        ext="ts"
                        showCopy={false}
                      />
                    </ExampleCodeWrapper>
                  </Tabs.Content>
                ))}
              </Tabs.ContentGroup>
            </Tabs.Root>
          </Box>
        </Stack>
      </Container>
    </Box>
  )
}