Skip to content

andyTsai2321/react-email-autocomplete-dropdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-email-autocomplete-dropdown

image

Demo

https://codesandbox.io/s/angry-elbakyan-s3xt7?file=/src/App.js

Installation

npm install react-email-autocomplete-dropdown

Usage

import React, { Component } from "react";
import Email from "react-email-autocomplete-dropdown";
import "react-email-autocomplete-dropdown/lib/main.min.css";

class App extends Component {
  render() {
    return (
      <div>
        <Email />
      </div>
    );
  }
}

export default App;

Custom domains

const domains = ["test.com", "hello.com"];
class App extends Component {
  render() {
    return (
      <div>
        <Email domains={domains} />
      </div>
    );
  }
}

export default App;

Events

handleOnChange=(e)=>{
    console.log(e.target.value)
}

dropdownClick=(value)=>{
    console.log(value)
}

......

<Email
  onChange={this.handleOnChange}
  dropdownOnClick={this.dropdownClick}
/>

Options

Name Type Description Example
value string input state value 'hello world'
placeholder string custom placeholder 'hello world'
domains array custom dropdown domains ["gmail.com","yahoo.com"]
disabled Boolean disable input false (Default)

Events

onChange, dropdownOnClick

License

This software is released under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published