-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Tab): add story and throw rest props to main component element
- Loading branch information
1 parent
c113f5e
commit 0c8a1ec
Showing
3 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,35 @@ | ||
// TODO | ||
import React from 'react'; | ||
import type { Meta, Story } from '@storybook/react'; | ||
import AssetsIcon from '@scaleflex/icons/assets'; | ||
import _Tab, { TabProps } from '../../src/core/tab'; | ||
import { StoryGroup } from './types'; | ||
|
||
export const Tab = _Tab; | ||
|
||
export default { | ||
title: `${StoryGroup.DataDisplay}/Tab`, | ||
component: Tab, | ||
excludeStories: ['Tab'], | ||
} as Meta; | ||
|
||
const defaultArgs = { | ||
label: 'Assets', | ||
icon: <AssetsIcon size={10} />, | ||
}; | ||
|
||
const BasicTemplate: Story<TabProps> = ({ | ||
...args | ||
}) => ( | ||
<Tab {...args} /> | ||
); | ||
|
||
// Basic | ||
export const Basic = BasicTemplate.bind({}); | ||
Basic.args = { ...defaultArgs }; | ||
|
||
// Active | ||
export const Active = BasicTemplate.bind({}); | ||
Active.args = { | ||
...defaultArgs, | ||
active: true, | ||
}; |