mui-editable-label

1.1.0 • Public • Published

mui-editable-label

Travis npm package Coveralls

mui-editable-label is a easy and small component Label that you can edit just by clicking.

how to use:

function Demo() {
  const [text, setText] = useState("Click here to edit.");

  return (
    <div>
      <h1>mui-editable-label Demo</h1>
      <MuiEditableLabel
        initialValue={text}
        onFocus={value => console.log("on focus: ", value)}
        onBlur={value => {
          console.log('on blur: ', value);
          setText(value);
        }}
      />
    </div>
  );
}

see a example here

component api

Events Description return
onFocus trigged when user clicks a string input value
onBlur trigged when user get out focus from component or press enter key a string input value

/mui-editable-label/

    Package Sidebar

    Install

    npm i mui-editable-label

    Weekly Downloads

    16

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    8 kB

    Total Files

    4

    Last publish

    Collaborators

    • roxdavirox