Skip to content

Commit

Permalink
Documentation: Gather all Gutenberg Documentation in Storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jun 15, 2017
1 parent c80a365 commit 7045980
Show file tree
Hide file tree
Showing 8 changed files with 112 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ import './style.scss';

function loadStories() {
window.wp = { ...window.wp, element };
require( './stories/intro' );
require( './stories/contributing' );
require( './stories/coding-guidelines' );
require( '../i18n/story' );
require( '../element/story' );
require( '../blocks/story' );
require( '../editor/story' );
require( '../components/story' );
require( '../components/button/story' );
require( '../components/higher-order/story' );
Expand Down
15 changes: 15 additions & 0 deletions .storybook/stories/coding-guidelines.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* External dependencies
*/
import ReactMarkdown from 'react-markdown';
import { storiesOf } from '@storybook/react';
import { withKnobs } from '@storybook/addon-knobs';

/**
* Internal dependencies
*/
import readme from '../../docs/coding-guidelines.md';

storiesOf( 'Gutenberg', module )
.addDecorator( withKnobs )
.add( 'Coding Guidelines', () => <ReactMarkdown source={ readme } /> );
15 changes: 15 additions & 0 deletions .storybook/stories/contributing.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* External dependencies
*/
import ReactMarkdown from 'react-markdown';
import { storiesOf } from '@storybook/react';
import { withKnobs } from '@storybook/addon-knobs';

/**
* Internal dependencies
*/
import readme from '../../CONTRIBUTING.md';

storiesOf( 'Gutenberg', module )
.addDecorator( withKnobs )
.add( 'Contributing', () => <ReactMarkdown source={ readme } /> );
15 changes: 15 additions & 0 deletions .storybook/stories/intro.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* External dependencies
*/
import ReactMarkdown from 'react-markdown';
import { storiesOf } from '@storybook/react';
import { withKnobs } from '@storybook/addon-knobs';

/**
* Internal dependencies
*/
import readme from '../../README.md';

storiesOf( 'Gutenberg', module )
.addDecorator( withKnobs )
.add( 'Intro', () => <ReactMarkdown source={ readme } /> );
15 changes: 15 additions & 0 deletions blocks/story/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* External dependencies
*/
import ReactMarkdown from 'react-markdown';
import { storiesOf } from '@storybook/react';
import { withKnobs } from '@storybook/addon-knobs';

/**
* Internal dependencies
*/
import readme from '../README.md';

storiesOf( 'Modules', module )
.addDecorator( withKnobs )
.add( 'Blocks', () => <ReactMarkdown source={ readme } /> );
15 changes: 15 additions & 0 deletions editor/story/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* External dependencies
*/
import ReactMarkdown from 'react-markdown';
import { storiesOf } from '@storybook/react';
import { withKnobs } from '@storybook/addon-knobs';

/**
* Internal dependencies
*/
import readme from '../README.md';

storiesOf( 'Modules', module )
.addDecorator( withKnobs )
.add( 'Editor', () => <ReactMarkdown source={ readme } /> );
15 changes: 15 additions & 0 deletions element/story/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* External dependencies
*/
import ReactMarkdown from 'react-markdown';
import { storiesOf } from '@storybook/react';
import { withKnobs } from '@storybook/addon-knobs';

/**
* Internal dependencies
*/
import readme from '../README.md';

storiesOf( 'Modules', module )
.addDecorator( withKnobs )
.add( 'Element', () => <ReactMarkdown source={ readme } /> );
15 changes: 15 additions & 0 deletions i18n/story/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* External dependencies
*/
import ReactMarkdown from 'react-markdown';
import { storiesOf } from '@storybook/react';
import { withKnobs } from '@storybook/addon-knobs';

/**
* Internal dependencies
*/
import readme from '../README.md';

storiesOf( 'Modules', module )
.addDecorator( withKnobs )
.add( 'i18n', () => <ReactMarkdown source={ readme } /> );

0 comments on commit 7045980

Please sign in to comment.