1.0.2-beta.0 • Published 3 years ago

@dekdekbaloo/react-thailand-address-typeahead v1.0.2-beta.0

Weekly downloads
12
License
MIT
Repository
github
Last release
3 years ago

react-thailand-address-typeahead (jQuery free)

Commitizen friendly

This project is forked from jquery.Thailand.js / react-thailand-address-typeahead

Added Features

  • Updated set of data
  • Added init function requiring custom address.json for flexibility
  • Custom container className

Demo

Original example with storybook

Requirement

  • react

Usage

import AddressFormTypeahead, { init } from 'react-thailand-address-typeahead';

// Before rendering
init(require('path/to/your/address.json'))

export default () => (
  <AddressFormTypeahead
    className='custom-container-class'
    onAddressSelected={(addressObject) => console.log(addressObject)}
  />
)

NOTE: For component styles you can include or use loader ./dist/styles.css to your app or implement by yourself styles

Further examples: Example

Development

  • Clone this project
  • run npm install
  • start development via storybook npm run storybook
  • navigate to localhost:9001

Testing

  • npm test

Contribute

  • open for any pullrequest
  • Commitizen is preferred !! 😎

Original fork and idea

earthchie - Project Owner, Original fork (you should treat him a beer 😎🍺)

License