@yozora/react-footnote-definition
TypeScript icon, indicating that this package has built-in type declarations

2.0.0-alpha.4 • Public • Published

@yozora/react-footnote-definition


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

Name Type Required Default Description
label string true - Footnote reference label
identifier string true - Footnote reference identifier
children React.ReactNode false - Footnote contents
className string false - Root css class
style React.CSSProperties false - Root css style
  • className: The root element of this component will always bind with the CSS class 'yozora-footnote-definition'

Related

Package Sidebar

Install

npm i @yozora/react-footnote-definition

Weekly Downloads

8

Version

2.0.0-alpha.4

License

MIT

Unpacked Size

12.6 kB

Total Files

8

Last publish

Collaborators

  • lemonclown