-
Notifications
You must be signed in to change notification settings - Fork 1
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
7 changed files
with
52 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ npm-debug.log* | |
node_modules | ||
|
||
# compiled storybook dir | ||
stories/static/compiled | ||
.storybook/static/storybook |
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 @@ | ||
<?php header( 'Location: /storybook/index.html' ); ?> |
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 @@ | ||
web: vendor/bin/heroku-php-nginx stories/static/ | ||
web: vendor/bin/heroku-php-nginx .storybook/static/ |
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,8 +1,11 @@ | ||
import React from 'react'; | ||
import { storiesOf, action } from '@kadira/storybook'; | ||
import { Button } from '../src'; | ||
import React from 'react' | ||
import { storiesOf, action } from '@kadira/storybook' | ||
import { Button } from '../src' | ||
|
||
storiesOf('Button', module) | ||
.add('with text', () => ( | ||
<Button onClick={action('clicked')}>Hello Button</Button> | ||
)) | ||
.add('with emoji', () => ( | ||
<Button onClick={action('clicked')}>😎</Button> | ||
)) |
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,42 @@ | ||
import React from 'react' | ||
import { storiesOf, action } from '@kadira/storybook' | ||
import { Input } from '../src' | ||
|
||
const inputProps = { | ||
name: 'person.firstName', | ||
value: '', | ||
onChange: action('field changed') | ||
} | ||
|
||
storiesOf('Input', module) | ||
.add('with default label', () => ( | ||
<Input | ||
input={inputProps} | ||
meta={{}} | ||
/> | ||
)) | ||
.add('with custom label', () => ( | ||
<Input | ||
input={inputProps} | ||
meta={{}} | ||
label="Custom Label" | ||
/> | ||
)) | ||
.add('with no label', () => ( | ||
<Input | ||
input={inputProps} | ||
meta={{}} | ||
label={false} | ||
/> | ||
)) | ||
.add('with invalid input', () => ( | ||
<Input | ||
input={inputProps} | ||
meta={{ | ||
invalid: true, | ||
touched: true, | ||
error: 'Invalid input' | ||
}} | ||
value="0000" | ||
/> | ||
)) |
This file was deleted.
Oops, something went wrong.