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

2.0.0-alpha.4 • Public • Published

@yozora/react-image


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

Install

  • npm

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

    yarn add @yozora/react-image

Usage

  • Basic:

    import React from 'react'
    import Image from '@yozora/react-image'
    import '@yozora/react-image/lib/esm/index.css'
    
    const wrapper = (<Image src="https://avatars.githubusercontent.com/u/42513619" />)

Props

Name Type Required Default Description
alt string false #src Image alt
className string false - Root css class
src string true - Image src
style React.CSSProperties false - Root css style
title string false - Image title
  • className: The root element of this component will always bind with the CSS class 'yozora-image'.

Related

Package Sidebar

Install

npm i @yozora/react-image

Weekly Downloads

1

Version

2.0.0-alpha.4

License

MIT

Unpacked Size

13 kB

Total Files

8

Last publish

Collaborators

  • lemonclown