forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge in react-storybook, add yarn lockfile
- Loading branch information
Showing
7 changed files
with
4,801 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
public/system | ||
public/assets | ||
node_modules | ||
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
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,16 @@ | ||
import { configure } from '@kadira/storybook'; | ||
import React from 'react'; | ||
import { storiesOf, action } from '@kadira/storybook'; | ||
|
||
import './storybook.css' | ||
|
||
window.storiesOf = storiesOf; | ||
window.action = action; | ||
window.React = React; | ||
|
||
function loadStories () { | ||
require('./stories/loading_indicator.story.jsx'); | ||
require('./stories/button.story.jsx'); | ||
} | ||
|
||
configure(loadStories, module); |
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,15 @@ | ||
import Button from '../../app/assets/javascripts/components/components/button.jsx' | ||
|
||
storiesOf('Button', module) | ||
.add('default state', () => ( | ||
<Button text="submit" onClick={action('clicked')} /> | ||
)) | ||
.add('secondary', () => ( | ||
<Button secondary text="submit" onClick={action('clicked')} /> | ||
)) | ||
.add('disabled', () => ( | ||
<Button disabled text="submit" onClick={action('clicked')} /> | ||
)) | ||
.add('block', () => ( | ||
<Button block text="submit" onClick={action('clicked')} /> | ||
)); |
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,6 @@ | ||
import LoadingIndicator from '../../app/assets/javascripts/components/components/loading_indicator.jsx' | ||
|
||
storiesOf('LoadingIndicator', module) | ||
.add('default state', () => ( | ||
<LoadingIndicator /> | ||
)); |
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,3 @@ | ||
#root { | ||
padding: 4rem; | ||
} |
Oops, something went wrong.