@mdx-js/tag
A fully-featured Markdown/MDX React component for ambitious projects
Last updated 2 years ago by johno .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @mdx-js/tag 
SYNC missed versions from official npm registry.

@mdx-js/tag

Build Status lerna Join the community on Spectrum

Map components to HTML elements based on the Markdown syntax. Useful with MDX.

Installation

npm:

npm i -S @mdx-js/tag

Usage

import React from 'react'
import {renderToString} from 'react-dom/server'
import {MDXTag} from '@mdx/tag'

const H1 = props => <h1 style={{color: 'tomato'}} {...props} />

console.log(renderToString(<MDXTag name="h1" children="Hello, world!" />))
console.log(renderToString(<MDXTag name="h1" components={{h1: H1}} children="Hello, world!" />))

Yields:

<h1>Hello, world!</h1>
<h1 style="color:tomato">Hello, world!</h1>

Contribute

See contributing.md in mdx-js/mdx for ways to get started.

This organisation has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.

License

MIT © Compositor and ZEIT

Current Tags

  • 0.20.3                                ...           latest (2 years ago)
  • 1.0.0-alpha.6                                ...           next (2 years ago)

33 Versions

  • 1.0.0-alpha.6                                ...           2 years ago
  • 1.0.0-alpha.5                                ...           2 years ago
  • 1.0.0-alpha.2                                ...           2 years ago
  • 1.0.0-alpha.1                                ...           2 years ago
  • 0.20.3                                ...           2 years ago
  • 1.0.0-alpha.0                                ...           2 years ago
  • 0.18.0                                ...           2 years ago
  • 0.17.5                                ...           2 years ago
  • 0.17.0                                ...           2 years ago
  • 0.16.8                                ...           2 years ago
  • 0.16.6                                ...           2 years ago
  • 0.16.1                                ...           2 years ago
  • 0.16.0                                ...           2 years ago
  • 0.15.6                                ...           2 years ago
  • 0.15.0                                ...           2 years ago
  • 0.15.0-4                                ...           2 years ago
  • 0.15.0-3                                ...           2 years ago
  • 0.15.0-2                                ...           2 years ago
  • 0.15.0-1                                ...           2 years ago
  • 0.14.1                                ...           3 years ago
  • 0.14.1-0                                ...           3 years ago
  • 0.14.0                                ...           3 years ago
  • 0.13.1-1                                ...           3 years ago
  • 0.13.1-0                                ...           3 years ago
  • 0.11.0                                ...           3 years ago
  • 0.11.0-0                                ...           3 years ago
  • 0.10.0                                ...           3 years ago
  • 0.7.2                                ...           3 years ago
  • 0.7.0                                ...           3 years ago
  • 0.7.0-2                                ...           3 years ago
  • 0.7.0-1                                ...           3 years ago
  • 0.7.0-0                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
Downloads
Today 8
This Week 301
This Month 1,125
Last Day 25
Last Week 408
Last Month 2,072
Dependencies (0)
None
Dev Dependencies (8)
Dependents (159)

Copyright 2014 - 2017 © taobao.org |