1.0.2 • Published 5 years ago

react-distpicker v1.0.2

Weekly downloads
5
License
MIT
Repository
-
Last release
5 years ago

react-distpicker

react-distpicker is a Chinese district picker for react, inspiring from Distpicker

Demo

https://aneureka.github.io/react-distpicker/

Getting started

Install

npm install react-distpicker -S

or

yarn add react-distpicker -S

Create component

import DistPicker from 'react-distpicker';

const App = () => (
    <DistPicker />
);

export default App;

You can have a glance in /examples.

Options

PropertyDescriptionTypeDefault value
placeholderProvinceplaceholder for province selectorstring—— 省 ——
placeholderCityplaceholder for city selectorstring—— 市 ——
placeholderDistrictplaceholder for district selectorString—— 区 ——
pickerClassclass for the Distpicker, mainly used to change the styleString
selectClassclass for the select component in DistPicker, mainly used to change the styleString
onSelectthe callback function while selecting, receiving an object including province, city and districtfunc

Contributor

Aneureka

License

The plugin is open-sourced software licensed under the MIT license.