Skip to content

Commit

Permalink
Add documentation for rest props
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrishabhsk committed Dec 18, 2024
1 parent f3ab0c2 commit 52300b3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/components/src/badge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ Badge variant.
- Type: `"default" | "info" | "success" | "warning" | "error"`
- Required: No
- Default: `default`

### `Additional Props`

- Any other props will be passed down to the underlying `span` element
16 changes: 16 additions & 0 deletions packages/components/src/badge/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ const meta = {
title: 'Components/Containers/Badge',
id: 'components-badge',
tags: [ 'status-private' ],
args: {
children: 'Code is Poetry',
intent: 'default',
// @ts-ignore
'...props': null,
},
argTypes: {
// @ts-ignore
'...props': {
control: {
type: null,
},
description:
'Any other props will be passed down to the underlying `span` element',
},
},
} satisfies Meta< typeof Badge >;

export default meta;
Expand Down

0 comments on commit 52300b3

Please sign in to comment.