Moved MarkupItReactRenderer to /components. Added a story for it.
This commit is contained in:
parent
78eb65bca2
commit
107e8f7104
@ -8,7 +8,7 @@ import MarkupIt from 'markup-it';
|
||||
import markdownSyntax from 'markup-it/syntaxes/markdown';
|
||||
import htmlSyntax from 'markup-it/syntaxes/html';
|
||||
import reInline from 'markup-it/syntaxes/markdown/re/inline';
|
||||
import MarkupItReactRenderer from '../MarkupItReactRenderer';
|
||||
import MarkupItReactRenderer from '../../UI/MarkupItReactRenderer/MarkupItReactRenderer';
|
||||
|
||||
describe('MarkitupReactRenderer', () => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React, { PropTypes } from 'react';
|
||||
import { getSyntaxes } from './richText';
|
||||
import MarkupItReactRenderer from './MarkupItReactRenderer';
|
||||
import MarkupItReactRenderer from '../MarkupItReactRenderer/index';
|
||||
|
||||
const schema = {
|
||||
'mediaproxy': ({ token }) => (
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { storiesOf, action } from '@kadira/storybook';
|
||||
|
||||
import FindBar from '../UI/FindBar/FindBar';
|
||||
import FindBar from '../FindBar/FindBar';
|
||||
|
||||
const CREATE_COLLECTION = 'CREATE_COLLECTION';
|
||||
const CREATE_POST = 'CREATE_POST';
|
||||
|
34
src/components/stories/MarkupItReactRenderer.js
Normal file
34
src/components/stories/MarkupItReactRenderer.js
Normal file
@ -0,0 +1,34 @@
|
||||
import React from 'react';
|
||||
import markdownSyntax from 'markup-it/syntaxes/markdown';
|
||||
import htmlSyntax from 'markup-it/syntaxes/html';
|
||||
import MarkupItReactRenderer from '../MarkupItReactRenderer';
|
||||
import { storiesOf } from '@kadira/storybook';
|
||||
|
||||
const mdContent = `
|
||||
# Title
|
||||
|
||||
* List 1
|
||||
* List 2
|
||||
`;
|
||||
|
||||
const htmlContent = `
|
||||
<h1>Title</h1>
|
||||
<ol>
|
||||
<li>List item 1</li>
|
||||
<li>List item 2</li>
|
||||
</ol>
|
||||
`;
|
||||
|
||||
storiesOf('MarkupItReactRenderer', module)
|
||||
.add('Markdown', () => (
|
||||
<MarkupItReactRenderer
|
||||
value={mdContent}
|
||||
syntax={markdownSyntax}
|
||||
/>
|
||||
|
||||
)).add('HTML', () => (
|
||||
<MarkupItReactRenderer
|
||||
value={htmlContent}
|
||||
syntax={htmlSyntax}
|
||||
/>
|
||||
));
|
@ -2,3 +2,4 @@ import './Card';
|
||||
import './Icon';
|
||||
import './Toast';
|
||||
import './FindBar';
|
||||
import './MarkupItReactRenderer';
|
||||
|
Loading…
x
Reference in New Issue
Block a user