2.0.0-alpha.4 • Published 3 years ago

@yozora/react-footnote-definition v2.0.0-alpha.4

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

This component is for rendering the footnote-definition data produced by @yozora/tokenizer-footnote-definition.\ This component has been built into @yozora/react-markdown, you can use it directly.

Install

  • npm

    npm install --save @yozora/react-footnote-definition
  • yarn

    yarn add @yozora/react-footnote-definition

Usage

  • Basic:

    import React from 'react'
    import FootnoteDefinition from '@yozora/react-footnote-definition'
    import '@yozora/react-footnote-definition/lib/esm/index.css'
    
    const wrapper = (
      <FootnoteDefinition
        label="1"
        identifier="footnote-1"
        className="custom-footnote-definition"
        style={{ marginTop: '2rem' }}
      >
        some text1
        <span>some text2</span>
      </FootnoteDefinition>
    )

Props

NameTypeRequiredDefaultDescription
labelstringtrue-Footnote reference label
identifierstringtrue-Footnote reference identifier
childrenReact.ReactNodefalse-Footnote contents
classNamestringfalse-Root css class
styleReact.CSSPropertiesfalse-Root css style
  • className: The root element of this component will always bind with the CSS class 'yozora-footnote-definition'

Related