@yozora/react-text
v2.0.0-alpha.4
Published
render markdown text node in react
Downloads
114
Readme
This component is for rendering the Text data produced by
@yozora/tokenizer-text.
This component has been built into @yozora/react-markdown, you can use it directly.
Install
npm
npm install --save @yozora/react-textyarn
yarn add @yozora/react-text
Usage
Basic:
import React from 'react' import Text from '@yozora/react-text' import '@yozora/react-text/lib/esm/index.css' const wrapper = (<Text value="Hello, world!" />)
Props
Name | Type | Required | Default | Description
:----------:|:---------------------:|:---------:|:-------:|:-------------
className | string | false | - | Root css class
style | React.CSSProperties | false | - | Root css style
value | string | true | - | Textural content
className: The root element of this component will always bind with the CSS class'yozora-text'.
