/emotion-autofill-input

Autofill detection with emotion and react

Primary LanguageJavaScript

emotion-autofill-input

Autofill detection with emotion and react

NPM

Install

yarn add emotion-autofill-input

// or

npm install --save emotion-autofill-input

Usage

import React, { Component } from "react";
import AutofillInput from "emotion-autofill-input";

export default class App extends Component {
  state = {
    value: "",
  };
  render() {
    return (
      <div>
        <AutofillInput
          value={this.state.value}
          onChange={e => {
            this.setState({ value: e.target.value })
            console.log(e.target.value);
          }}
          name="name"
          onAutoFill={filled => console.log(filled)}
        />
      </div>
    );
  }
}

License

MIT © browniefed