JSPM

@jswork/react-inline-edit

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11
  • Score
    100M100P100Q52336F
  • License MIT

Inline editing for react.

Package Exports

  • @jswork/react-inline-edit
  • @jswork/react-inline-edit/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@jswork/react-inline-edit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-inline-edit

Inline editing for react.

version license size download

installation

npm install -S @jswork/react-inline-edit

usage

  1. import css
@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: ()
  1. import 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 (
    <Container>
      <ReactInlineEdit value={value} onChange={(e) => setValue(e.target.value)} />
    </Container>
  );
};

preview

license

Code released under the MIT license.