0.0.13 • Published 5 years ago

@stnew/markdown v0.0.13

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Markdown

A React component for parsing and rendering a markdown string, with support for custom tags that map to React components.

Examples

// string
const exampleString = "## test";

// React
<Markdown content={exampleString} />

// renders
<h2>test</h2>
//string
const exampleString = `
## test
<ComponentA />
<ComponentB className="test">children</ComponentB>
`;

// React
import ComponentA from './ComponentA';
import ComponentB from './ComponentB';

<Markdown
  content={exampleString}
  customTags={{
    ComponentA,
    ComponentB,
  }}
/>

// renders
<h2>test</h2>
<ComponentA />
<ComponentB className="test">children</ComponentB>
0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago