README
@yozora/react-paragraph
This component is for rendering the Paragraph data produced by
@yozora/tokenizer-paragraph.
This component has been built into @yozora/react-markdown, you can use it directly.
Install
npm
npm install --save @yozora/react-paragraph
yarn
yarn add @yozora/react-paragraph
Usage
Basic:
import React from 'react' import Paragraph from '@yozora/react-paragraph' import '@yozora/react-paragraph/lib/esm/index.css' const wrapper = ( <Paragraph style={{ color: 'orange', fontSize: '16px' }}> some text1 <span>some text2</span> </Paragraph> )
Props
Name | Type | Required | Default | Description |
---|---|---|---|---|
children |
React.ReactNode |
false |
- | Paragraph 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-paragraph'