File tree Expand file tree Collapse file tree 3 files changed +27
-9
lines changed Expand file tree Collapse file tree 3 files changed +27
-9
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,9 @@ enum TINT {
42
42
SAND = "sand" ,
43
43
}
44
44
enum ROUNDING {
45
- MINIMAL = "minimal " ,
45
+ SMALL = "sm " ,
46
46
NORMAL = "normal" ,
47
+ MEDIUM = "md" ,
47
48
FULL = "full" ,
48
49
}
49
50
@@ -316,13 +317,13 @@ export const ThemeToggle = () => {
316
317
/>
317
318
318
319
< IconButton
319
- title = "Rounding: Minimal "
320
- active = { rounding === ROUNDING . MINIMAL }
321
- onClick = { ( ) => changeRounding ( ROUNDING . MINIMAL ) }
320
+ title = "Rounding: Small "
321
+ active = { rounding === ROUNDING . SMALL }
322
+ onClick = { ( ) => changeRounding ( ROUNDING . SMALL ) }
322
323
>
323
324
< div
324
325
style = { {
325
- width : "1rem " ,
326
+ width : "1.5rem " ,
326
327
height : "1rem" ,
327
328
borderRadius : "2px" ,
328
329
backgroundColor : "gray" ,
@@ -337,22 +338,37 @@ export const ThemeToggle = () => {
337
338
>
338
339
< div
339
340
style = { {
340
- width : "1rem " ,
341
+ width : "1.5rem " ,
341
342
height : "1rem" ,
342
343
borderRadius : "4px" ,
343
344
backgroundColor : "gray" ,
344
345
} }
345
346
/>
346
347
</ IconButton >
347
348
349
+ < IconButton
350
+ title = "Rounding: Medium"
351
+ active = { rounding === ROUNDING . MEDIUM }
352
+ onClick = { ( ) => changeRounding ( ROUNDING . MEDIUM ) }
353
+ >
354
+ < div
355
+ style = { {
356
+ width : "1.5rem" ,
357
+ height : "1rem" ,
358
+ borderRadius : "6px" ,
359
+ backgroundColor : "gray" ,
360
+ } }
361
+ />
362
+ </ IconButton >
363
+
348
364
< IconButton
349
365
title = "Rounding: Full"
350
366
active = { rounding === ROUNDING . FULL }
351
367
onClick = { ( ) => changeRounding ( ROUNDING . FULL ) }
352
368
>
353
369
< div
354
370
style = { {
355
- width : "1rem " ,
371
+ width : "1.5rem " ,
356
372
height : "1rem" ,
357
373
borderRadius : "8px" ,
358
374
backgroundColor : "gray" ,
Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ export default {
147
147
const [ globals ] = useGlobals ( ) ;
148
148
149
149
useEffect ( ( ) => {
150
+ const scheme = localStorage . getItem ( "storybook-scheme" ) ?? "light" ;
150
151
const theme = localStorage . getItem ( "storybook-theme" ) ?? "denim:jade" ;
151
152
const tint = localStorage . getItem ( "storybook-tint" ) ?? "silver" ;
152
153
const round = localStorage . getItem ( "storybook-rounding" ) ?? "normal" ;
@@ -163,6 +164,7 @@ export default {
163
164
"--ruf-tint" ,
164
165
`var(--${ tint } )` ,
165
166
) ;
167
+ document . documentElement . dataset . colorScheme = scheme ;
166
168
document . documentElement . dataset . rounding = round ;
167
169
} , [ ] ) ;
168
170
Original file line number Diff line number Diff line change 86
86
background-color : color-mix (in lab, var (--ruf-bg ) 92% , var (--ruf-tint ));
87
87
}
88
88
89
- [data-rounding = "minimal " ] {
89
+ [data-rounding = "sm " ] {
90
90
/* default rounding */
91
91
--ruf-rounding : 2px ;
92
92
--ruf-rounding-cap : 2px ;
93
93
}
94
94
95
- [data-rounding = "normal " ] {
95
+ [data-rounding = "md " ] {
96
96
/* default rounding */
97
97
--ruf-rounding : 0.5rem ;
98
98
--ruf-rounding-cap : 0.5rem ;
You can’t perform that action at this time.
0 commit comments