Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 1.69 KB

README.md

File metadata and controls

37 lines (27 loc) · 1.69 KB

react-mobile-image-editor

Installation

# npm
> npm install react-mobile-image-editor

# yarn
> yarn add react-mobile-image-editor

Examples

import Editor, { useExport } from "react-mobile-image-editor";

import image from "./assets/chibubao.png";

const App = () => {
  const editorRef = useExport();

  const handleDownload = () => {
    console.log(editorRef.current.exportImage());
  };

  return (
    <Editor
      ref={editorRef}
      image={image}
      toolbarBottom={<button onClick={handleDownload}>Download</button>}
    />
  );
};