Skip to content
This repository was archived by the owner on Mar 16, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ src/**/*.css
# editors
/.vscode/
.idea/*

# storybook build
/storybook-static
189 changes: 75 additions & 114 deletions src/stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,170 +12,131 @@ import Identicon from '../Components/Identicon'
import Icon from '../Components/Icon'
import SearchBar from '../Components/SearchBar'

import Input from '../Input'
import TruncatedTextBox from '../TruncatedTextBox'
import Grid from '../ContractsTable/Grid'
import Input from '../Components/Input'
import TruncatedTextBox from '../Components/TruncatedTextBox'
import Grid from '../Components/ContractsTable/Grid'

import '../bootstrap/index.css'

/** *************** Icon *****************/

storiesOf('Icon', module)
.add(
'Icon with name=Disputes, theme=dark',
() => <Icon
name='Disputes'
theme='dark' />
)
storiesOf('Icon', module).add('Icon with name=Disputes, theme=dark', () => (
<Icon name='Disputes' theme='dark' />
))

/** *************** Identicon *****************/

storiesOf('Identicon', module)
.add('default (50x50)', () => <Identicon />)
.add(
'small format (24x24)',
() => <Identicon size={8} scale={3} width={24} height={24} />
)
.add('small format (24x24)', () => (
<Identicon size={8} scale={3} width={24} height={24} />
))

/** *************** ShortProfile *****************/

storiesOf('ShortProfile', module)
.add('default', () => <ShortProfile />)
.add(
'with icon, username and balance',
() => <ShortProfile
.add('with icon, username and balance', () => (
<ShortProfile
address='0x5DF9B87991262F6BA471F09758CDE1c0FC1De734'
balancePNK={242}
icon={<Identicon />} />
)
.add(
'with dark background, icon, address and balance',
() => <ShortProfile
icon={<Identicon />}
/>
))
.add('with dark background, icon, address and balance', () => (
<ShortProfile
theme='dark'
address='0x5DF9B87991262F6BA471F09758CDE1c0FC1De734'
balancePNK={242}
icon={<Identicon />} />
)
icon={<Identicon />}
/>
))
.add(
'with dark background, icon, address, balance and active notification',
() => <ShortProfile
theme='dark'
address='0x5DF9B87991262F6BA471F09758CDE1c0FC1De734'
balancePNK={242}
notificationIsActive
icon={<Identicon />} />
() => (
<ShortProfile
theme='dark'
address='0x5DF9B87991262F6BA471F09758CDE1c0FC1De734'
balancePNK={242}
notificationIsActive
icon={<Identicon />}
/>
)
)

/** *************** ItemMenuSidebar *****************/

storiesOf('ItemMenuSidebar', module)
.addDecorator(StoryRouter())
.add(
'default',
() => <ItemMenuSidebar />
)
.add(
'with dark background and name',
() => <ItemMenuSidebar
name='items'
theme='dark' />
)
.add('default', () => <ItemMenuSidebar />)
.add('with dark background and name', () => (
<ItemMenuSidebar name='items' theme='dark' />
))

/** *************** MenuSidebar *****************/

storiesOf('MenuSidebar', module)
.addDecorator(StoryRouter())
.add(
'default',
() => <MenuSidebar />
)
.add(
'with items=Disputes,Contracts',
() => <MenuSidebar
items={['Disputes', 'Contracts']} />
)
.add('default', () => <MenuSidebar />)
.add('with items=Disputes,Contracts', () => (
<MenuSidebar items={['Disputes', 'Contracts']} />
))

/** *************** Sidebar *****************/

storiesOf('Sidebar', module)
.addDecorator(StoryRouter())
.add(
'with items=Disputes, Contracts, Jury',
() =>
<Sidebar
address={0xA1E4380A3B1f749673E270229993eE55F35663b4}
balancePNK={242}
items={['Disputes', 'Contracts', 'Jury']} />
)
.add('with items=Disputes, Contracts, Jury', () => (
<Sidebar
address={0xa1e4380a3b1f749673e270229993ee55f35663b4}
balancePNK={242}
items={['Disputes', 'Contracts', 'Jury']}
/>
))

/** *************** SearchBar *****************/
/** *************** SearchBar *****************/

storiesOf('SearchBar', module)
.add(
'default',
() =>
<SearchBar />
)
storiesOf('SearchBar', module).add('default', () => <SearchBar />)

/** ************** Input ********************/
/** ************** Input ********************/

storiesOf('Input', module)
.add(
'default',
() => <Input />
)
.add(
'input text type with placeholder',
() => <Input
type='text'
placeholder='Add your name here' />
)
.add(
'textarea with placeholder',
() => <Input
type='textarea'
placeholder='Add your comments' />
)
.add(
'radio button',
() => <Input type='radio' />
)
.add(
'file input type with placeholder',
() => <Input type='file' placeholder='Browse file' />
)
.add('default', () => <Input />)
.add('input text type with placeholder', () => (
<Input type='text' placeholder='Add your name here' />
))
.add('textarea with placeholder', () => (
<Input type='textarea' placeholder='Add your comments' />
))
.add('radio button', () => <Input type='radio' />)
.add('file input type with placeholder', () => (
<Input type='file' placeholder='Browse file' />
))

/** *************** TruncatedTextBox *****************/

storiesOf('TruncatedTextBox', module)
.add('default',
() => <TruncatedTextBox />
)
.add(
'with text and truncatedCharacters=4',
() => <TruncatedTextBox
.add('default', () => <TruncatedTextBox />)
.add('with text and truncatedCharacters=4', () => (
<TruncatedTextBox
text='with text length is greater than/equal to truncatedCharacters'
truncatedCharacters={4} />
)
.add(
'with text length less than truncatedCharacter=8',
() => <TruncatedTextBox
truncatedCharacters={4}
/>
))
.add('with text length less than truncatedCharacter=8', () => (
<TruncatedTextBox
text='with text length is less than truncatedCharacters'
truncatedCharacters={8} />
)
truncatedCharacters={8}
/>
))

/** *************** Grid ****************/

storiesOf('Grid', module)
.add(
'default',
() => <Grid />
)
.add(
'with input text and icon',
() =>
<Grid>
<Input type='text' placeholder='Type something here' />
<Icon name='Disputes' theme='dark' />
</Grid>
)
.add('default', () => <Grid />)
.add('with input text and icon', () => (
<Grid>
<Input type='text' placeholder='Type something here' />
<Icon name='Disputes' theme='dark' />
</Grid>
))