Skip to content

Commit

Permalink
docs: add Utrecht Data Badge
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbert committed Nov 12, 2024
1 parent 23c149b commit 1049c54
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/storybook/src/utrecht/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"react-utrecht-mark",
"react-utrecht-superscript",
"react-utrecht-subscript",
"react-utrecht-data-badge--default",
"react-utrecht-color-sample"
]
}
8 changes: 3 additions & 5 deletions packages/theme-toolkit/src/component-stories-utrecht.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import {
UnorderedListItem,
OrderedList,
OrderedListItem,
DataBadge,
Document,
// BadgeCounter,
// BadgeData,
// Blockquote,
Checkbox,
// CustomCheckbox ,
Expand Down Expand Up @@ -63,8 +63,6 @@ const Blockquote = ({ children }: PropsWithChildren) => <div className="utrecht-

const BadgeCounter = ({ children }: PropsWithChildren) => <div className="utrecht-badge-counter">{children}</div>;

const BadgeData = ({ children }: PropsWithChildren) => <div className="utrecht-badge-data">{children}</div>;

export const UTRECHT_COMPONENT_STORIES: ComponentStory[] = [
{
storyId: 'react-utrecht-button--default',
Expand Down Expand Up @@ -793,10 +791,10 @@ export const UTRECHT_COMPONENT_STORIES: ComponentStory[] = [
render: () => <BadgeCounter>42</BadgeCounter>,
},
{
storyId: 'react-utrecht-badge-data--default',
storyId: 'react-utrecht-data-badge--default',
group: STORY_GROUPS['BADGES'],
name: 'Utrecht Data Badge',
render: () => <BadgeData>Category 1</BadgeData>,
render: () => <DataBadge>Category 1</DataBadge>,
},
{
storyId: 'react-utrecht-blockquote--default',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import type { Meta, StoryObj } from '@storybook/react';
import { DataBadge } from '@utrecht/component-library-react/dist/css-module';

const meta = {
id: 'utrecht-data-badge',
title: 'Components/Data Badge/Utrecht',
component: DataBadge,
args: { children: 'Nieuw!' },
} satisfies Meta<typeof DataBadge>;

type Story = StoryObj<typeof meta>;

export default meta;

export const VoorbeeldTheme: Story = {
name: 'Voorbeeld theme',
parameters: { theme: 'voorbeeld-theme' },
};

export const UtrechtTheme: Story = {
name: 'Utrecht theme',
parameters: { theme: 'utrecht-theme' },
};

0 comments on commit 1049c54

Please sign in to comment.