@jswork/react-figure

1.0.0 • Public • Published

react-figure

A tiny figure image for react.

version license size download

installation

npm install -S @jswork/react-figure

properties

Name Type Required Default Description
className string false - The extended className for component.
caption any false - Default image caption.

usage

  1. import css
@import "~@jswork/react-figure/dist/style.css";

// or use sass
@import "~@jswork/react-figure/dist/style.scss";

// customize your styles:
$react-figure-options: ()
  1. import js
import ReactDemokit from '@jswork/react-demokit';
import React from 'react';
import ReactDOM from 'react-dom';
import NxRandomAvatar from '@jswork/next-random-avatar';
import ReactFigure from '@jswork/react-figure';
import './assets/style.scss';

class App extends React.Component {
  render() {
    return (
      <ReactDemokit
        className="p-3 app-container"
        url="https://github.com/afeiship/react-figure">
        <ReactFigure caption="test picture">
          <img src={NxRandomAvatar.lego()} alt="" />
        </ReactFigure>
      </ReactDemokit>
    );
  }
}

ReactDOM.render(<App />, document.getElementById('app'));

documentation

license

Code released under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i @jswork/react-figure

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

17.8 kB

Total Files

7

Last publish

Collaborators

  • afeiship