-
Notifications
You must be signed in to change notification settings - Fork 0
/
chakra.txt
443 lines (441 loc) · 12.6 KB
/
chakra.txt
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
import React from 'react'
import {
ChakraProvider,
Box,
Image,
Badge,
Text,
Icon,
Stack,
Avatar,
AvatarBadge,
Alert,
AlertIcon,
AlertTitle,
AlertDescription,
FormLabel,
Input,
FormHelperText,
FormErrorMessage,
Grid,
Switch,
InputGroup,
InputRightElement,
Flex,
Tag,
Heading,
Button
} from '@chakra-ui/react'
import {
StarIcon,
EmailIcon,
ChevronLeftIcon,
ChevronRightIcon
} from '@chakra-ui/icons'
const App = () => (
<ChakraProvider resetCSS>
<Flex
display="flex"
flexDirection="column"
alignItems="center"
justifyContent="center"
textAlign="center"
mt={4}
>
<Flex
display="flex"
flexDirection="row"
alignItems="flex-start"
justifyContent="flex-start"
>
<Text fontSize="3xl" fontWeight="bold">
⚡️Welcome to OpenChakra
</Text>
<Badge variant="subtle" colorScheme="pink" ml={1}>
BETA
</Badge>
</Flex>
<Text color="gray.500">The Visual Editor for Chakra UI</Text>
</Flex>
<Grid p={10} gap={6} templateColumns="repeat(auto-fit, minmax(350px, 1fr))">
<Stack>
<Box
backgroundColor="white"
boxShadow="sm"
borderRadius="lg"
pl={3}
pr={3}
pt={5}
pb={5}
>
<Flex
display="flex"
flexDirection="row"
alignItems="center"
justifyContent="flex-start"
pb={2}
>
<ChevronLeftIcon />
<Heading
size="md"
as="h2"
lineHeight="shorter"
fontWeight="bold"
fontFamily="heading"
letterSpacing="tighter"
>
Component Panel
</Heading>
</Flex>
<Stack ml={4} spacing={2} mt={4} mr={4}>
<Stack
justifyContent="flex-start"
alignItems="flex-start"
spacing={2}
>
<Tag
size="md"
variant="subtle"
colorScheme="whatsapp"
borderRadius="sm"
fontSize="sm"
>
Drag and Drop!
</Tag>
<Text fontSize="md" color="gray.600">
Drag any component from the left hand panel into this editor.
Then start interacting with them: try to drop the Avatar
component in this box…
</Text>
<Box
width="200px"
display="block"
flexDirection="column"
alignItems="flex-start"
justifyContent="flex-start"
backgroundColor="gray.100"
borderRadius="lg"
p={3}
minHeight="60px"
/>
</Stack>
<Stack spacing={2}>
<Tag size="md" variant="subtle" colorScheme="whatsapp">
Preset
</Tag>
<Text color="gray.600" letterSpacing="tight">
A preset is a group of components (like Alert). Just drop a
preset to easily setup a complex component like this:
</Text>
</Stack>
<Alert variant="left-accent" status="success">
<AlertIcon />
<AlertTitle mr={1}>Alert!</AlertTitle>
<AlertDescription>I'm an Alert preset</AlertDescription>
</Alert>
</Stack>
</Box>
</Stack>
<Box>
<Box
backgroundColor="white"
borderRadius="lg"
boxShadow="sm"
pl={3}
pr={3}
pt={5}
pb={5}
>
<Flex
display="flex"
flexDirection="row"
alignItems="center"
justifyContent="flex-end"
>
<Heading
size="md"
as="h2"
lineHeight="shorter"
fontWeight="bold"
fontFamily="heading"
>
Inspector
</Heading>
<ChevronRightIcon />
</Flex>
<Stack spacing={4} ml={4} mt={4}>
<Stack spacing={2}>
<Tag size="md" variant="subtle" colorScheme="yellow">
Update props & style
</Tag>
<Text fontSize="md" color="gray.600">
On the right hand side, you can find the inspectror panel. You
will find the tools to edit the component's props and style.
</Text>
</Stack>
<Stack spacing={2}>
<Tag size="md" variant="subtle" colorScheme="yellow">
Delete, reset and read doc
</Tag>
<Text color="gray.600" lineHeight="tall">
Reach the yellow bar on the top to delete, reset and access the
Chakra doc of each component.
</Text>
</Stack>
<Stack spacing={2}>
<Tag size="md" variant="subtle" colorScheme="yellow">
Sort components
</Tag>
<Text color="gray.600">
By clicking on a component containing children, you will see a
Children panel appearing on the right. It enables sorting the
children.{' '}
</Text>
</Stack>
</Stack>
</Box>
</Box>
<Box>
<Box
backgroundColor="white"
borderRadius="lg"
boxShadow="sm"
pl={3}
pr={3}
pt={5}
pb={5}
>
<Flex
display="flex"
flexDirection="column"
alignItems="flex-start"
justifyContent="flex-start"
mb={2}
pl={4}
>
<Heading
size="md"
as="h2"
lineHeight="shorter"
fontWeight="bold"
fontFamily="heading"
>
Editor
</Heading>
</Flex>
<Stack spacing={5} pl={4} pt={4}>
<Stack spacing={2}>
<Tag size="md" variant="solid" colorScheme="facebook">
Builder mode
</Tag>
<Text color="gray.600">
The Builder mode adds extra padding/border to ease components
selection (like containers).
</Text>
</Stack>
<Stack>
<Tag size="md" variant="solid" colorScheme="facebook">
Code Panel
</Tag>
<Text color="gray.600">
Toggle the code panel for viewing the JSX/React code of your
components. You can even export your code directly to
CodeSandbox!
</Text>
</Stack>
<Stack spacing={4}>
<Tag size="md" variant="solid" colorScheme="facebook">
Shortcuts
</Tag>
<Stack isInline>
<Tag size="sm" variant="subtle">
cmd+z
</Tag>
<Tag size="sm" variant="subtle" colorScheme="gray">
ctrl+z
</Tag>
<Text color="gray.600">Undo</Text>
</Stack>
<Stack isInline>
<Tag size="sm" variant="subtle" colorScheme="gray">
cmd+y
</Tag>
<Tag size="sm" variant="subtle" colorScheme="gray">
ctrl+y
</Tag>
<Text color="gray.600">Redo</Text>
</Stack>
<Stack isInline>
<Tag size="md" variant="subtle" colorScheme="gray">
b
</Tag>
<Text color="gray.600">Toggle Builder mode</Text>
</Stack>
<Stack isInline>
<Tag size="sm" variant="subtle" colorScheme="gray">
c
</Tag>
<Text color="gray.600">Toggle Code panel</Text>
</Stack>
</Stack>
</Stack>
</Box>
</Box>
<Box
display="flex"
flexDirection="column"
alignItems="center"
justifyContent="center"
p={10}
>
<Text
fontSize="lg"
lineHeight="normal"
textAlign="center"
mb={5}
color="twitter.900"
maxWidth="sm"
>
With a bit of practice, you will able to design awesome components:
</Text>
<Box
bg="#ffffff"
borderRadius="lg"
width="sm"
minHeight="sm"
border="1px solid lightgrey"
overflow="hidden"
>
<Box>
<Image
size="100px"
fallbackSrc="https://via.placeholder.com/150"
src="https://images.unsplash.com/photo-1512917774080-9991f1c4c750?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80"
width="100%"
height="auto"
minHeight="245px"
/>
</Box>
<Box p={5} pb={8}>
<Box
display="flex"
justifyContent="flex-start"
alignItems="flex-start"
mb={1}
flexDirection="row"
>
<Badge
variant="subtle"
colorScheme="teal"
mr={2}
borderRadius="lg"
pl={2}
pr={2}
>
NEW
</Badge>
<Text color="gray.500" fontSize="xs">
3 BEDS • 2 BATHS
</Text>
</Box>
<Text fontWeight="bold" fontSize="xl">
Modern home in city center
</Text>
<Text fontSize="sm" mb={3}>
$119/night
</Text>
<Box
display="flex"
alignItems="center"
flexDirection="row"
justifyContent="flex-start"
>
<StarIcon color="yellow.400" mr={1} />
<Text fontWeight="bold" mr={1}>
4.84
</Text>
<Text fontSize="sm">(190)</Text>
</Box>
</Box>
</Box>
</Box>
<Box>
<Button variant="solid" size="md" colorScheme="red">
Button text
</Button>
<Button variant="outline" size="md" colorScheme="red">
Button text
</Button>
<Button variant="ghost" size="md" colorScheme="red">
Button text
</Button>
</Box>
<Box display="block">
<Box
backgroundColor="white"
border="1px solid lightgrey"
borderRadius="lg"
mb={3}
>
<Image
height="100px"
width="100%"
src="https://www.un.org/sites/un2.un.org/themes/bootstrap_un2/images/logo-en.svg"
p={4}
/>
<Box p={5} borderTop="1px solid lightgrey">
<Heading size="md">United Nations</Heading>
<Text color="gray.600">
global international and intergovernmental organization
</Text>
</Box>
</Box>
<Box
backgroundColor="white"
border="1px solid lightgrey"
borderRadius="lg"
mb={3}
>
<Image
height="100px"
width="100%"
src="https://www.imf.org/assets/imf/images/footer/IMF_seal.svg"
p={4}
/>
<Box p={5} borderTop="1px solid lightgrey">
<Heading size="md">International Monetary Fund</Heading>
<Text color="gray.600">international organization</Text>
</Box>
</Box>
<Box
backgroundColor="white"
border="1px solid lightgrey"
borderRadius="lg"
display="flex"
flexDirection="column"
justifyContent="flex-start"
alignItems="center"
>
<Image
height="100px"
width="100%"
src="https://upload.wikimedia.org/wikipedia/commons/8/89/INEGI.png"
p={4}
overflow="visible"
boxSize="100px"
/>
<Box p={5} borderTop="1px solid lightgrey">
<Heading size="md">
National Institute of Statistics and Geography
</Heading>
<Text color="gray.600" mt={1}>
Mexico's principal government institution in charge of statistics
and census data
</Text>
</Box>
</Box>
</Box>
</Grid>
</ChakraProvider>
)
export default App