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

2.0.0-alpha.4 • Public • Published

@yozora/react-list


This component is for rendering the List data produced by @yozora/tokenizer-list.
This component has been built into @yozora/react-markdown, you can use it directly.

Install

  • npm

    npm install --save @yozora/react-list
  • yarn

    yarn add @yozora/react-list

Usage

  • Basic:

    import React from 'react'
    import List from '@yozora/react-list'
    import ListItem from '@yozora/react-list-item'
    import '@yozora/react-list/lib/esm/index.css'
    
    const wrapper = (
      <List ordered={ true } start={ 3 } type="a">
        <ListItem key={ 0 }>apple</ListItem>
        <ListItem key={ 1 }>banana</ListItem>
        <ListItem key={ 2 }>cat</ListItem>
      </List>
    )

Props

Name Type Required Default Description
children React.ReactNode false - List items
className string false - Root css class
ordered boolean true - Indicate an ordered list
start number false - Start number of ordered list
style React.CSSProperties false - Root css style
  • className: The root element of this component will always bind with the CSS class 'yozora-list'

Related

Package Sidebar

Install

npm i @yozora/react-list

Weekly Downloads

2

Version

2.0.0-alpha.4

License

MIT

Unpacked Size

14.4 kB

Total Files

8

Last publish

Collaborators

  • lemonclown