Skip to content

Commit

Permalink
feat(app-components): add input stories
Browse files Browse the repository at this point in the history
  • Loading branch information
rams23 committed Jan 26, 2021
1 parent 4588efe commit 78f96fa
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
34 changes: 34 additions & 0 deletions packages/game-app/src/_shared/components/Input/Input.stories.tsx
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 />,
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Story, Meta } from '@storybook/react';
import TextInput from './TextInput';

export default {
title: 'Components/TextInput',
title: 'Components/FormTextInput',
component: TextInput,
argTypes: {},
} as Meta;
Expand Down

0 comments on commit 78f96fa

Please sign in to comment.