@yozora/react-footnote-definition
v2.0.0-alpha.4
Published
render markdown footnote-definition in react
Downloads
9
Maintainers
Readme
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-definitionyarn
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'
