Skip to content

Commit d689add

Browse files
var-porodpellier
authored andcommitted
docs(storybook): include Kbd component in theme generator and gallery
1 parent 8f4a4e8 commit d689add

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

packages/storybook/src/components/themeGenerator/themeGeneratorPreview/ThemeGeneratorPreview.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import * as FileUploadStories from '../../../../stories/components/file-upload/f
1616
import * as FormFieldStories from '../../../../stories/components/form-field/form-field.stories';
1717
import * as IconStories from '../../../../stories/components/icon/icon.stories';
1818
import * as InputStories from '../../../../stories/components/input/input.stories';
19+
import * as KbdStories from '../../../../stories/components/kbd/kbd.stories';
1920
import * as LinkStories from '../../../../stories/components/link/link.stories';
2021
import * as MediumStories from '../../../../stories/components/medium/medium.stories';
2122
import * as MessageStories from '../../../../stories/components/message/message.stories';
@@ -63,6 +64,7 @@ const THEME_STORY_MODULES = {
6364
FormField: FormFieldStories,
6465
Icon: IconStories,
6566
Input: InputStories,
67+
Kbd: KbdStories,
6668
Link: LinkStories,
6769
Medium: MediumStories,
6870
Message: MessageStories,
@@ -120,6 +122,7 @@ const THEME_PREVIEW_COMPONENTS: ThemePreviewItem[] = [
120122
{ key: 'FormField', kind: REACT_COMPONENTS_TITLE.formField, label: 'Form Field' },
121123
{ key: 'Icon', kind: REACT_COMPONENTS_TITLE.icon, label: 'Icon' },
122124
{ key: 'Input', kind: REACT_COMPONENTS_TITLE.input, label: 'Input' },
125+
{ key: 'Kbd', kind: REACT_COMPONENTS_TITLE.kbd, label: 'Kbd' },
123126
{ key: 'Link', kind: REACT_COMPONENTS_TITLE.link, label: 'Link' },
124127
{ key: 'Medium', kind: REACT_COMPONENTS_TITLE.medium, label: 'Medium' },
125128
{ key: 'Message', kind: REACT_COMPONENTS_TITLE.message, label: 'Message' },

packages/storybook/src/constants/meta.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ enum REACT_COMPONENTS_TITLE {
4949
formField = `${SECTION.reactComponents}/Form Field`,
5050
icon = `${SECTION.reactComponents}/Icon`,
5151
input = `${SECTION.reactComponents}/Input`,
52+
kbd = `${SECTION.reactComponents}/Kbd`,
5253
link = `${SECTION.reactComponents}/Link`,
5354
medium = `${SECTION.reactComponents}/Medium`,
5455
menu = `${SECTION.reactComponents}/Menu`,

packages/storybook/stories/components/gallery.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { Overview as FileUpload } from './file-upload/file-upload.stories';
1515
import { Overview as FormField } from './form-field/form-field.stories';
1616
import { Overview as Icon } from './icon/icon.stories';
1717
import { Overview as Input } from './input/input.stories';
18+
import { Overview as Kbd } from './kbd/kbd.stories';
1819
import { Overview as Link } from './link/link.stories';
1920
import { Overview as Medium } from './medium/medium.stories';
2021
import { Overview as Message } from './message/message.stories';
@@ -72,6 +73,7 @@ import { REACT_COMPONENTS_TITLE } from '../../src/constants/meta';
7273
{ kind: REACT_COMPONENTS_TITLE.formField, name: 'Form Field', story: FormField },
7374
{ kind: REACT_COMPONENTS_TITLE.icon, name: 'Icon', story: Icon },
7475
{ kind: REACT_COMPONENTS_TITLE.input, name: 'Input', story: Input },
76+
{ kind: REACT_COMPONENTS_TITLE.kbd, name: 'Kbd', story: Kbd },
7577
{ kind: REACT_COMPONENTS_TITLE.link, name: 'Link', story: Link },
7678
{ kind: REACT_COMPONENTS_TITLE.medium, name: 'Medium', story: Medium },
7779
{ kind: REACT_COMPONENTS_TITLE.message, name: 'Message', story: Message },

packages/storybook/stories/components/kbd/kbd.stories.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,10 @@ export const Overview: Story = {
4949
</>
5050
),
5151
};
52+
53+
export const ThemeGenerator: Story = {
54+
tags: ['!dev'],
55+
render: ({}) => (
56+
<Kbd>Cmd</Kbd>
57+
),
58+
};

0 commit comments

Comments
 (0)