react-eos-account-input-autocomplete

0.1.2 • Public • Published

✍️ react-eos-account-input-autocomplete

Simple React component that implements the auto-completion of account names on the EOS Blockchain.

 


 

📃 Installation

npm install react-eos-account-input-autocomplete

 


 

🚀 Usage

 
  import EosAccountInputAutocomplete from 'react-eos-account-input-autocomplete'
 
  const [value, setValue] = useState('')
 
  ....
 
  <EosAccountInputAutocomplete 
    value={value}
    limit={5} //default to 10
    rpc={'your rpc address or an instance of JsonRpc'}
    onChange={_e => setValue(_e.target.value)}
    onSelect={_value => setValue(_value)}
    onFetchAccounts={_accounts => console.log(_accounts)}
  />

 


 

🎭 Customization

It's possible to override the css classes (by default they are empty):

  • eos-account-input-autocomplete__input: input text
  • eos-account-input-autocomplete__list: list container
  • eos-account-input-autocomplete__item: single item within the list

Dependents (0)

Package Sidebar

Install

npm i react-eos-account-input-autocomplete

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

481 kB

Total Files

11

Last publish

Collaborators

  • allemanfredi