@@ -77,9 +77,9 @@ export const SideBySide = styled('ul')`
77
77
margin-bottom: 0;
78
78
}
79
79
80
- display: grid;
81
- grid-template-columns: 1fr 1fr;
82
- gap: ${space (2 )};
80
+ display: grid;
81
+ grid-template-columns: 1fr 1fr;
82
+ gap: ${space (2 )};
83
83
` ;
84
84
85
85
export const PalettePanel = styled (Panel )`
@@ -90,18 +90,18 @@ export const PalettePanelItem = styled(PanelItem)`
90
90
flex-direction: column;
91
91
gap: ${space (0.5 )};
92
92
93
- &:first-child {
94
- border-radius: ${p => p .theme .borderRadius } ${p => p .theme .borderRadius } 0 0;
95
- }
96
- &:last-child {
97
- border-radius: 0 0 ${p => p .theme .borderRadius } ${p => p .theme .borderRadius };
98
- }
99
- &:first-child:last-child {
100
- border-radius: ${p => p .theme .borderRadius };
101
- }
93
+ &:first-child {
94
+ border-radius: ${p => p .theme .borderRadius } ${p => p .theme .borderRadius } 0 0;
95
+ }
96
+ &:last-child {
97
+ border-radius: 0 0 ${p => p .theme .borderRadius } ${p => p .theme .borderRadius };
98
+ }
99
+ &:first-child:last-child {
100
+ border-radius: ${p => p .theme .borderRadius };
101
+ }
102
102
103
- background: ${p => p .theme [p .color ]};
104
- color: ${p => p .theme [p .text ]};
103
+ background: ${p => p .theme [p .color ]};
104
+ color: ${p => p .theme [p .text ]};
105
105
` ;
106
106
107
107
export const ExampleImg = styled (' img' )`
@@ -147,41 +147,41 @@ export const ExampleCardGrid = styled('figcaption')`
147
147
export const ExampleCard = ({imgSrc , text , isPositive }) => (
148
148
<figure >
149
149
<ExampleImg src = { imgSrc } />
150
- <ExampleCardGrid >
151
- { isPositive ? <PositiveLabel /> : <NegativeLabel />}
152
- <span >{ text } </span >
153
- </ExampleCardGrid >
154
- </figure >
150
+ <ExampleCardGrid >
151
+ { isPositive ? <PositiveLabel /> : <NegativeLabel />}
152
+ <span >{ text } </span >
153
+ </ExampleCardGrid >
154
+ </figure >
155
155
);
156
156
157
157
export const ColorPalette = ({name , palette }) => {
158
158
const theme = useTheme ();
159
159
160
- return (
161
- < SideBySide >
162
- { palette . map (( section , i ) => {
163
- return (
164
- < li key = { ` ${ name }-${ i } ` } >
165
- < PalettePanel typeof = " ul " >
166
- { section . map (( color , index ) => {
167
- return (
168
- < PalettePanelItem
169
- key = { ` ${ name }-${ color . color }-${ index } ` }
170
- color = { color .color }
171
- text = { color .text }
172
- >
173
- < strong > { color . color } </ strong >
174
- { theme [ color .color ] }
175
- </ PalettePanelItem >
176
- );
177
- }) }
178
- </ PalettePanel >
179
- </ li >
180
- );
181
- }) }
182
- </ SideBySide >
183
- );
184
- }
160
+ return (
161
+
162
+ < SideBySide >
163
+ { palette . map (( section , i ) => {
164
+ return (
165
+ < li key = { ` ${ name }-${ i } ` } >
166
+ < PalettePanel typeof = " ul " >
167
+ { section . map (( color , index ) => {
168
+ return (
169
+ < PalettePanelItem
170
+ key = { ` ${ name }-${ color .color }-${ index } ` }
171
+ color = { color .color }
172
+ text = { color . text }
173
+ >
174
+ < strong > { color .color } </ strong >
175
+ { theme [ color . color ] }
176
+ </ PalettePanelItem >
177
+ );
178
+ }) }
179
+ </ PalettePanel >
180
+ </ li >
181
+ );
182
+ }) }
183
+ </ SideBySide >
184
+ ); }
185
185
186
186
# Colors
187
187
@@ -199,7 +199,7 @@ Here are the recommended use cases:
199
199
- ** Gray 400:** body text, input values & labels.
200
200
- ** Gray 300:** input placeholders, inactive/disabled inputs and buttons, chart labels, supplemental and non-essential text
201
201
- ** Gray 200:** borders around large elements (cards, panels, dialogs, tables).
202
- - ** Gray 100:** dividers and borders around small elements (buttons, form inputs). * /}
202
+ - ** Gray 100:** dividers and borders around small elements (buttons, form inputs). \ * /}
203
203
204
204
<Storybook.ThemeToggle >
205
205
<ColorPalette name = " grays" palette = { GRAY_PALETTES } />
0 commit comments