1.0.6 • Published 5 years ago

@danestves/react-markdown v1.0.6

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

npm versionBuild Status

This is forked from React component to parse and render Platzi Flavored Markdown content

react-markdown

React component to parse and render Flavored Markdown content

This component made use of @danestves/markdown to render a content using markdown in a React application.

Usage

Install it with:

npm i -S @danestves/react-markdown

yarn add @danestves/react-markdown

Import it with:

import React from 'react';
import Markdown from '@danestves/react-markdown';

function App() {
  return (
    <Markdown
      tagName='div'
      content='**Hello World in Bold!**'
      parser={
        {
          // @danestves/markdown options
        }
      }
    />
  );
}
  • You cand send any native DOM attribute to the Markdown component.
  • The default tagName is a div.
  • The value of parser is an empty object by default.
  • The content is required.

Run test

You have 4 ways to run tests.

  • npm t: run the test once
  • npm run test:fix: run the test and fix the snapshots
  • npm run test:watch: run the test and keep watching changes
  • npm run test:report: run test and generate a coverage report