@@ -4,9 +4,7 @@ menu: Components
44---
55
66import { Playground , Props } from ' docz' ;
7- import { Badge } from ' ./Badge' ;
8- import { ThemeContext } from ' ../../theme' ;
9- import { Box } from ' ../Box' ;
7+ import { Badge , Box } from ' ..' ;
108
119# Badge
1210
@@ -29,44 +27,75 @@ import { Box } from '../Box';
2927 </Box >
3028</Playground >
3129
32- ### Default
30+ ### Variants
3331
3432<Playground >
35- <ThemeContext.Consumer >
36- { theme => (
37- <Box >
38- { Object .keys (theme .fills .solid ).map (color => (
39- <Box flexDirection = " row" key = { color } >
40- <Badge color = { color } >{ color } </Badge >
41- <Badge color = { color } isSolid >
42- { color }
43- </Badge >
44- </Box >
45- ))}
46- </Box >
47- )}
48- </ThemeContext.Consumer >
49- </Playground >
50-
51- ### Pills
52-
53- <Playground >
54- <ThemeContext.Consumer >
55- { theme => (
56- <Box >
57- { Object .keys (theme .fills .solid ).map (color => (
58- <Box flexDirection = " row" key = { color } >
59- <Badge shape = " pill" color = { color } >
60- { color }
61- </Badge >
62- <Badge shape = " pill" color = { color } isSolid >
63- { color }
64- </Badge >
65- </Box >
66- ))}
67- </Box >
68- )}
69- </ThemeContext.Consumer >
33+ <Box >
34+ <Box flexDirection = " row" >
35+ <Badge color = " neutral" shape = " pill" >
36+ neutral
37+ </Badge >
38+ <Badge color = " neutral" isSolid >
39+ neutral
40+ </Badge >
41+ </Box >
42+ <Box flexDirection = " row" >
43+ <Badge color = " blue" shape = " pill" >
44+ blue
45+ </Badge >
46+ <Badge color = " blue" isSolid >
47+ blue
48+ </Badge >
49+ </Box >
50+ <Box flexDirection = " row" >
51+ <Badge color = " red" shape = " pill" >
52+ red
53+ </Badge >
54+ <Badge color = " red" isSolid >
55+ red
56+ </Badge >
57+ </Box >
58+ <Box flexDirection = " row" >
59+ <Badge color = " orange" shape = " pill" >
60+ orange
61+ </Badge >
62+ <Badge color = " orange" isSolid >
63+ orange
64+ </Badge >
65+ </Box >
66+ <Box flexDirection = " row" >
67+ <Badge color = " yellow" shape = " pill" >
68+ yellow
69+ </Badge >
70+ <Badge color = " yellow" isSolid >
71+ yellow
72+ </Badge >
73+ </Box >
74+ <Box flexDirection = " row" >
75+ <Badge color = " green" shape = " pill" >
76+ green
77+ </Badge >
78+ <Badge color = " green" isSolid >
79+ green
80+ </Badge >
81+ </Box >
82+ <Box flexDirection = " row" >
83+ <Badge color = " teal" shape = " pill" >
84+ teal
85+ </Badge >
86+ <Badge color = " teal" isSolid >
87+ teal
88+ </Badge >
89+ </Box >
90+ <Box flexDirection = " row" >
91+ <Badge color = " purple" shape = " pill" >
92+ purple
93+ </Badge >
94+ <Badge color = " purple" isSolid >
95+ purple
96+ </Badge >
97+ </Box >
98+ </Box >
7099</Playground >
71100
72101### Props
0 commit comments