Skip to content

amanuela97/react-chakra-editable-label

Repository files navigation

react-chakra-editable-label

A library that allows you to switch between a text label and an input field. The library utlizes Chakara UI under the hood.

Table of Contents

Installation

$ npm install react-chakra-editable-label $ yarn add react-chakra-editable-label

Usage

The react-chakra-editable-label object requires two props:

  • text which is the initial text to display
  • onSave which is the function called when the is updated.

Example:

import React from 'react';

import { EditableLabel } from 'react-chakra-editable-label';

const App = () => {
    return (
            <EditableLabel
                text='World'
                onSave={value => {
                    console.log(value);
                }}
            />
    );
}

About

A react label component that is editable and uses Chakra UI

Resources

Stars

Watchers

Forks

Packages

No packages published