@therebel/react-click-to-edit

1.0.0-alpha.2 • Public • Published

React Click-To-Edit

A simple component make the text editable.

Installation

$ npm install react-click-to-edit
or
$ yarn add react-click-to-edit

General Usage

import ClickToEdit from "react-click-to-edit"

<ClickToEdit
  /*
    String className to be applied to wrapper the input and text element.
  */
  wrapperClass="wrapperClase"
  /*
  	String className to be applied to the input element.
  */
  inputClass="inputClass"
  /*
  	String className to be applied to the text element.
  */
  textClass="textClass"
  /*
  	String value to be applied to the input and text element.
  */
  value={value}
  /*
  	Function that will be called after the input element lose focus or press carriage return.
  */
  endEditing={() => {}}
/>

Issues

Feel free to submit issues and enhancement requests.

License

MIT

Package Sidebar

Install

npm i @therebel/react-click-to-edit

Weekly Downloads

0

Version

1.0.0-alpha.2

License

MIT

Unpacked Size

85.8 kB

Total Files

6

Last publish

Collaborators

  • therebelrobot