react-print-nb

1.0.43 • Public • Published

react - print - nb

react print plugin, Simple, fast, convenient, light.

Install

npm install react-print-nb --save

Demo

Edit react - to - print

example:

Calling from class components

import React from "react";
import ReactPrintNb from "react-print-nb";
export default class App extends React.Component {
  render() {
    return (
      <div>
        <button
          onClick={() => {
            this.refs.test.onPrint();
          }}
        >
          print
        </button>
        <ReactPrintNb ref="test">
          {/* print content */}
          <p>
            <h1>you are beatiful</h1>
           <img src="https://img1.baidu.com/it/u=425067323,3523178242&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500"/>
          </p>
        </ReactPrintNb>
      </div>
    );
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i react-print-nb

Weekly Downloads

4

Version

1.0.43

License

ISC

Unpacked Size

25.7 kB

Total Files

3

Last publish

Collaborators

  • star_chen