File tree Expand file tree Collapse file tree 1 file changed +11
-29
lines changed Expand file tree Collapse file tree 1 file changed +11
-29
lines changed Original file line number Diff line number Diff line change 1
1
import React , { ReactNode } from "react"
2
- import styled from "@emotion/styled"
3
- import Emoji from "./OldEmoji"
4
-
5
- const StyledCard = styled . div `
6
- border-radius: 4px;
7
- display: flex;
8
- `
9
-
10
- const Content = styled . div `
11
- flex: 0 1 75%;
12
- margin-left: 2rem;
13
- `
14
-
15
- const Description = styled . p `
16
- opacity: 0.8;
17
- margin-top: -1rem;
18
- margin-bottom: 0.5rem;
19
- `
20
-
21
- const Title = styled . p `
22
- font-size: 1.25rem;
23
- `
2
+ import Emoji from "./Emoji"
3
+ import { Text , Box , Flex } from "@chakra-ui/react"
24
4
25
5
export interface IProps {
26
6
children ?: React . ReactNode
@@ -39,14 +19,16 @@ const HorizontalCard: React.FC<IProps> = ({
39
19
className,
40
20
emojiSize,
41
21
} ) => (
42
- < StyledCard className = { className } >
43
- < Emoji size = { emojiSize } text = { emoji } />
44
- < Content >
45
- < Title > { title } </ Title >
46
- < Description > { description } </ Description >
22
+ < Flex borderRadius = "base" className = { className } >
23
+ < Emoji fontSize = { `${ emojiSize } rem` } text = { emoji } />
24
+ < Box flexGrow = "0" flexShrink = "1" flexBasis = "75%" ml = "8" >
25
+ < Text fontSize = "lg" > { title } </ Text >
26
+ < Text opacity = "0.8" mt = "-4" mb = "2" >
27
+ { description }
28
+ </ Text >
47
29
{ children }
48
- </ Content >
49
- </ StyledCard >
30
+ </ Box >
31
+ </ Flex >
50
32
)
51
33
52
34
export default HorizontalCard
You can’t perform that action at this time.
0 commit comments