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

2.0.0-alpha.4 • Public • Published

@yozora/react-inline-code


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

Install

  • npm

    npm install --save @yozora/react-inline-code
  • yarn

    yarn add @yozora/react-inline-code

Usage

  • Basic:

    import React from 'react'
    import InlineCode from '@yozora/react-inline-code'
    import '@yozora/react-inline-code/lib/esm/index.css'
    
    const wrapper = (
      <InlineCode
        value="Hello, world!"
        style={ { color: 'orange', fontSize: '16px' } }
      />
    )

Props

Name Type Required Default Description
className string false - Root css class
style React.CSSProperties false - Root css style
value string true - Source codes
  • className: The root element of this component will always bind with the CSS class 'yozora-inline-code'.

Related

Package Sidebar

Install

npm i @yozora/react-inline-code

Weekly Downloads

1

Version

2.0.0-alpha.4

License

MIT

Unpacked Size

8.59 kB

Total Files

8

Last publish

Collaborators

  • lemonclown