https://github.com/afeiship/react-inline-edit
Inline editing for react.
https://github.com/afeiship/react-inline-edit
edit editing inline react
Last synced: about 1 month ago
JSON representation
Inline editing for react.
- Host: GitHub
- URL: https://github.com/afeiship/react-inline-edit
- Owner: afeiship
- License: mit
- Created: 2017-07-24T02:01:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-12-20T15:33:40.000Z (over 3 years ago)
- Last Synced: 2024-05-20T10:03:28.088Z (11 months ago)
- Topics: edit, editing, inline, react
- Language: TypeScript
- Homepage:
- Size: 245 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-wepy - wepy-flexbox-grid:Flexbox grid system for wepy/weapp/wechat
README
# react-inline-edit
> Inline editing for react.[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]## installation
```shell
npm install -S @jswork/react-inline-edit
```## usage
1. import css
```scss
@import "~@jswork/react-inline-edit/dist/style.css";// or use sass
@import "~@jswork/react-inline-edit/dist/style.scss";// customize your styles:
$react-inline-edit-options: ()
```
2. import js
```js
import React, { useState, useEffect } from 'react';
import ReactInlineEdit from '@jswork/react-inline-edit';
import styled from 'styled-components';
import '../../src/components/style.scss';const Container = styled.div`
width: 80%;
margin: 30px auto 0;
`;export default () => {
const [value, setValue] = useState('Hello inline edit');useEffect(() => {
console.log('value changed:', value);
}, [value]);return (
setValue(e.target.value)} />
);
};```
## preview
- https://afeiship.github.io/react-inline-edit/## license
Code released under [the MIT license](https://github.com/afeiship/react-inline-edit/blob/master/LICENSE.txt).[version-image]: https://img.shields.io/npm/v/@jswork/react-inline-edit
[version-url]: https://npmjs.org/package/@jswork/react-inline-edit[license-image]: https://img.shields.io/npm/l/@jswork/react-inline-edit
[license-url]: https://github.com/afeiship/react-inline-edit/blob/master/LICENSE.txt[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/react-inline-edit
[size-url]: https://github.com/afeiship/react-inline-edit/blob/master/dist/react-inline-edit.min.js[download-image]: https://img.shields.io/npm/dm/@jswork/react-inline-edit
[download-url]: https://www.npmjs.com/package/@jswork/react-inline-edit