|
1 | 1 | import React from "react"
|
2 |
| -import styled from "@emotion/styled" |
3 |
| - |
4 |
| -import Emoji from "./OldEmoji" |
| 2 | +import { Flex, Heading } from "@chakra-ui/react" |
| 3 | +import Emoji from "./Emoji" |
5 | 4 | import Translation from "./Translation"
|
6 | 5 |
|
7 |
| -const Card = styled.div` |
8 |
| - display: flex; |
9 |
| - flex-direction: column; |
10 |
| - color: ${(props) => props.theme.colors.textTableOfContents}; |
11 |
| - margin-top: 3rem; |
12 |
| - justify-content: space-between; |
13 |
| - background: ${(props) => props.theme.colors.searchBackground}; |
14 |
| - border-radius: 4px; |
15 |
| - border: 1px solid ${(props) => props.theme.colors.lightBorder}; |
16 |
| - padding: 1.5rem; |
17 |
| - padding-bottom: 0rem; |
18 |
| -` |
19 |
| - |
20 |
| -const Title = styled.h2` |
21 |
| - font-size: 1rem; |
22 |
| - line-height: 140%; |
23 |
| - letter-spacing: 0.04em; |
24 |
| - margin-left: 1.5rem; |
25 |
| - text-transform: uppercase; |
26 |
| - color: ${(props) => props.theme.colors.textTableOfContents}; |
27 |
| -` |
28 |
| - |
29 |
| -const TopContent = styled.div` |
30 |
| - display: flex; |
31 |
| - align-items: flex-start; |
32 |
| -` |
33 |
| - |
34 | 6 | export interface IProps {
|
35 | 7 | children?: React.ReactNode
|
36 | 8 | }
|
37 | 9 |
|
38 | 10 | const SectionNav: React.FC<IProps> = ({ children }) => (
|
39 |
| - <Card> |
40 |
| - <TopContent> |
41 |
| - <Emoji text=":point_right:" mb={`1em`} /> |
42 |
| - <Title> |
| 11 | + <Flex |
| 12 | + direction="column" |
| 13 | + color="textTableOfContents" |
| 14 | + marginTop={12} |
| 15 | + justify="space-between" |
| 16 | + background="searchBackground" |
| 17 | + borderRadius="base" |
| 18 | + border="1px solid" |
| 19 | + borderColor="lightBorder" |
| 20 | + padding={6} |
| 21 | + paddingBottom={0} |
| 22 | + > |
| 23 | + <Flex align="flex-start"> |
| 24 | + <Emoji text=":point_right:" mb={4} /> |
| 25 | + <Heading |
| 26 | + as="h2" |
| 27 | + fontSize="md" |
| 28 | + lineHeight={7 / 5} |
| 29 | + letterSpacing="wider" |
| 30 | + marginLeft={6} |
| 31 | + textTransform="uppercase" |
| 32 | + > |
43 | 33 | <Translation id="in-this-section" />
|
44 |
| - </Title> |
45 |
| - </TopContent> |
| 34 | + </Heading> |
| 35 | + </Flex> |
46 | 36 | {children}
|
47 |
| - </Card> |
| 37 | + </Flex> |
48 | 38 | )
|
49 | 39 |
|
50 | 40 | export default SectionNav
|
0 commit comments