File tree Expand file tree Collapse file tree 1 file changed +117
-1
lines changed
src/components/card-interactive Expand file tree Collapse file tree 1 file changed +117
-1
lines changed Original file line number Diff line number Diff line change @@ -235,8 +235,10 @@ import CardCheckbox from './CardCheckbox';
235235
236236### States
237237
238+ #### Dark
239+
238240<Canvas >
239- <Story name = " States" >
241+ <Story name = " States Dark " >
240242 { args => (
241243 <StoryVariantTable >
242244 <thead >
@@ -313,6 +315,120 @@ import CardCheckbox from './CardCheckbox';
313315 </Story >
314316</Canvas >
315317
318+ #### Light
319+
320+ <Canvas >
321+ <Story
322+ name = " States Light"
323+ decorators = { [
324+ Story => (
325+ <div
326+ style = { {
327+ background: ' var(--black)' ,
328+ }}
329+ >
330+ <Story />
331+ </div >
332+ ),
333+ ]}
334+ >
335+ { args => (
336+ <StoryVariantTable >
337+ <thead >
338+ <tr >
339+ <th />
340+ <th >
341+ <Text
342+ color = " text-white"
343+ weight = " bold"
344+ transform = " capitalize"
345+ size = " medium"
346+ >
347+ default
348+ </Text >
349+ </th >
350+ <th >
351+ <Text
352+ color = " text-white"
353+ weight = " bold"
354+ transform = " capitalize"
355+ size = " medium"
356+ >
357+ disabled
358+ </Text >
359+ </th >
360+ <th >
361+ <Text
362+ color = " text-white"
363+ weight = " bold"
364+ transform = " capitalize"
365+ size = " medium"
366+ >
367+ error
368+ </Text >
369+ </th >
370+ </tr >
371+ </thead >
372+ <tbody >
373+ { [' outline' , ' solid' ].map (variant => {
374+ return [false , true ].map (indicator => {
375+ return [false , true ].map (checked => {
376+ const states = [' default' , ' disabled' , ' error' ].map (states => (
377+ <td >
378+ <CardCheckbox
379+ { ... args }
380+ variant = { variant }
381+ width = " 120px"
382+ height = " 64px"
383+ disabled = { states === ' disabled' }
384+ invalid = { states === ' error' }
385+ defaultChecked = { checked }
386+ color = " light"
387+ >
388+ { indicator && <CardCheckbox.Indicator slot = " top-left" />}
389+ <Flex
390+ justifyContent = " center"
391+ alignItems = " center"
392+ fullHeight
393+ >
394+ <Text color = " text-gray-50" size = " xsmall" weight = " bold" >
395+ Placeholder
396+ </Text >
397+ </Flex >
398+ </CardCheckbox >
399+ </td >
400+ ));
401+ return (
402+ <tr >
403+ <td >
404+ <Text
405+ color = " text-white"
406+ weight = " bold"
407+ size = " small"
408+ transform = " capitalize"
409+ >
410+ { variant }
411+ <br />
412+ { checked ? ' checked' : ' unchecked' }
413+ <br />
414+ { indicator
415+ ? ' with indicator'
416+ : ' without indicator' } { ' ' }
417+ <br />
418+ </Text >
419+ </td >
420+ { states }
421+ </tr >
422+ );
423+ });
424+ });
425+ })}
426+ </tbody >
427+ </StoryVariantTable >
428+ )}
429+ </Story >
430+ </Canvas >
431+
316432### Examples
317433
318434#### Animated icons
You can’t perform that action at this time.
0 commit comments