Skip to content

Commit

Permalink
controls labels
Browse files Browse the repository at this point in the history
  • Loading branch information
mimarz committed Oct 25, 2024
1 parent 703a38f commit d5a24c2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
7 changes: 5 additions & 2 deletions packages/react/stories/showcase.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
}

.controls {
display: flex;
gap: var(--ds-spacing-2);
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: auto;
gap: var(--ds-spacing-4);
padding-bottom: var(--ds-spacing-2);
align-items: baseline;
}

.card {
Expand Down
15 changes: 14 additions & 1 deletion packages/react/stories/showcase.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,34 @@ export const Showcase: StoryFn = () => {

return (
<div>
<div className={classes.controls}>
<div className={classes.controls} data-size='sm'>
<Heading data-size='2xs'>
Størrelse
<code>(data-size)</code>
</Heading>
<ToggleGroup value={size} onChange={(val) => setSize(val as Size)}>
{sizes.map((size) => (
<ToggleGroup.Item key={size} value={size}>
{size}
</ToggleGroup.Item>
))}
</ToggleGroup>
<Heading data-size='2xs'>
Fargemodus
<code>(data-ds-color-mode)</code>
</Heading>

<ToggleGroup value={colorMode} onChange={setColorMode}>
{colorModes.map((colorMode) => (
<ToggleGroup.Item key={colorMode} value={colorMode}>
{colorMode}
</ToggleGroup.Item>
))}
</ToggleGroup>
<Heading data-size='2xs'>
Typografi
<code>(data-ds-typography)</code>
</Heading>
<ToggleGroup value={typographyMode} onChange={setTypographyMode}>
{typography.map((typographyMode) => (
<ToggleGroup.Item key={typographyMode} value={typographyMode}>
Expand Down

0 comments on commit d5a24c2

Please sign in to comment.