-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
108 additions
and
243 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React from 'react' | ||
import { StoryFn, Meta } from '@storybook/react' | ||
import Input, { InputProps } from '.' | ||
|
||
const selectMock = { | ||
generic: { | ||
as: 'select', | ||
props: { | ||
children: [ | ||
<option key="1">Option 1</option>, | ||
<option key="2">Option 2</option> | ||
] | ||
} | ||
} | ||
} | ||
|
||
export default { | ||
title: 'Input', | ||
component: Input, | ||
args: { | ||
name: 'test' | ||
}, | ||
argTypes: { | ||
type: { | ||
control: { | ||
type: 'text' | ||
} | ||
} | ||
} | ||
} as Meta | ||
|
||
export const Default: StoryFn<InputProps> = (args) => <Input {...args} /> | ||
|
||
export const Date: StoryFn<InputProps> = (args) => ( | ||
<Input {...args} type="date" /> | ||
) | ||
export const Number: StoryFn<InputProps> = (args) => ( | ||
<Input {...args} type="number" /> | ||
) | ||
export const Password: StoryFn<InputProps> = (args) => ( | ||
<Input {...args} type="password" /> | ||
) | ||
|
||
export const Polymorphism: StoryFn<InputProps> = (args) => ( | ||
<Input {...args} {...selectMock} /> | ||
) |
4 changes: 2 additions & 2 deletions
4
src/packages/GenericInput/styles.ts → src/packages/Input/styles.ts
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
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,4 +1,4 @@ | ||
import styled from 'styled-components' | ||
import GenericInput from '../GenericInput' | ||
import Input from '../Input' | ||
|
||
export const Select = styled(GenericInput)`` | ||
export const Select = styled(Input)`` |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.