forked from chakra-ui/vue-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCompareFlex.vue
30 lines (28 loc) · 891 Bytes
/
CompareFlex.vue
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
<template>
<CBox>
<CText>Flex and Spacer: Full width, equal Spacing</CText>
<CFlex>
<CBox w='70px' h='10' bg='red.500' />
<CSpacer />
<CBox w='170px' h='10' bg='red.500' />
<CSpacer />
<CBox w='180px' h='10' bg='red.500' />
</CFlex>
<CText>
Grid: The children start at the beginning, the 1/3 mark and 2/3 mark
</CText>
<CGrid template-columns='repeat(3, 1fr)' gap={6}>
<CBox w='70px' h='10' bg='blue.500' />
<CBox w='170px' h='10' bg='blue.500' />
<CBox w='180px' h='10' bg='blue.500' />
</CGrid>
<CText>
HStack: The children have equal spacing but don't span the whole container
</CText>
<CHStack spacing='24px'>
<CBox w='70px' h='10' bg='teal.500' />
<CBox w='170px' h='10' bg='teal.500' />
<CBox w='180px' h='10' bg='teal.500' />
</CHStack>
</CBox>
</template>