-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(app-components): add input stories
- Loading branch information
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
packages/game-app/src/_shared/components/Input/Input.stories.tsx
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React from 'react'; | ||
import { Story, Meta } from '@storybook/react'; | ||
import { ReactComponent as KeyboardIcon } from '../../../assets/icons/keyboard.svg'; | ||
|
||
import Input from './Input'; | ||
|
||
export default { | ||
title: 'Components/Input', | ||
component: Input, | ||
argTypes: {}, | ||
} as Meta; | ||
|
||
const Template: Story<React.ComponentProps<typeof Input>> = args => <Input {...args} />; | ||
|
||
export const Default = Template.bind({}); | ||
|
||
Default.args = {}; | ||
|
||
export const Clear = Template.bind({}); | ||
Clear.decorators = [ | ||
Story => ( | ||
<div style={{ padding: '50px', background: 'lightgray' }}> | ||
<Story /> | ||
</div> | ||
), | ||
]; | ||
Clear.args = { | ||
variant: 'clear', | ||
}; | ||
|
||
export const WithIcon = Template.bind({}); | ||
WithIcon.args = { | ||
iconLeft: <KeyboardIcon />, | ||
}; |
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