2.0.0-alpha.2 • Published 3 years ago

@yozora/html-thematic-break v2.0.0-alpha.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

This component is for rendering the Yozora Markdown AST node IThematicBreak produced by @yozora/tokenizer-thematic-break into HTML string.

This component has been built into @yozora/html-markdown, you can use it directly.

Install

  • npm

    npm install --save @yozora/html-thematic-break
  • yarn

    yarn add @yozora/html-thematic-break

Usage

  • Basic:

    import type { IThematicBreak } from '@yozora/ast'
    import renderThematicBreak from '@yozora/html-thematic-break'
    
    const thematicBreak: IThematicBreak = { "type": "thematicBreak" }
    renderThematicBreak(thematicBreak)
    // => <hr class="yozora-thematic-break" />

Related