1.0.8 • Published 6 years ago

react-city-selector v1.0.8

Weekly downloads
32
License
ISC
Repository
github
Last release
6 years ago

react-city-selector_China

A ReactJS component to render a city selector for Chinese Cities.

Installation

Install react-city-selector with npm:

$ npm install react-city-selector

Usage

Very easy to use. Just provide props with total amount of things that you want to display on the page.

import React, { Component } from "react";
import ReactDOM from "react-dom";
import CitySelector from "react-city-selector";

ReactDOM.render(
    <CitySelector onTabsChange={onTabsChange} onCityChange={onCityChange}/>,  document.getElementById("root")
)

Params

NameTypeDefaultDescription
onTabsChangeFunctioncities’ first letter tabs change handler
onCityChangeFunctionselected city change handler. Receive selected name as arg

example image

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago