@yozora/react-list-item
v2.0.0-alpha.4
Published
render markdown list-item in react
Maintainers
Readme
This component is for rendering the ListItem data produced by
@yozora/tokenizer-list-item.
This component has been built into @yozora/react-markdown, you can use it directly.
Install
npm
npm install --save @yozora/react-list-itemyarn
yarn add @yozora/react-list-item
Usage
Basic:
import React from 'react' import ListItem from '@yozora/react-list-item' import '@yozora/react-list-item/lib/esm/index.css' const wrapper = ( <ListItem status="done" style={ { color: 'orange', fontSize: '16px' } }> some text1 <span>some text2</span> </ListItem )
Props
Name | Type | Required | Default | Description
:----------:|:-----------------------:|:---------:|:-------:|:-------------
status | 'todo'|'doing'|'done' | false | - | Status of TODO item
children | React.ReactNode | false | - | List item 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-list-item'
