0.4.0 • Published 1 year ago

iran-province v0.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

iran-province

A customizable select, witch has all the provinces in Iran.

Installation

npm i iran-province

Usage

import IranProvince from 'iran-province';

const App = () => (
  <>
    <IranProvince
      onChange={(e) => {console.log(e)}}
    />;
  </>
);

export default App;

Props

Common props you may want to specify include:

  • label - apply name to the select
  • disabled - handle if it should be disabled
  • labelClass - apply a className to the label
  • autoFocus - focus the control when it mounts
  • selectClass - apply a className to the select
  • optionClass - apply a className to the options
  • className - apply a className to the container
  • language - you can choose between persian and english
  • onChange - handle what happens after changing a value
  • form - defines which form the drop-down list belongs to
  • placeholder - change the text displayed when no option is selected

Provinces type

interface IProvince {
  id: string;
  persian: string;
  english: string;
  latitude: number;
  longitude: number;
  isCapital: boolean;
  population: number;
}

License

MIT Licensed. Copyright (c) 2023 Shirin apr

0.3.9

1 year ago

0.4.0

1 year ago

0.3.6

1 year ago

0.3.5

1 year ago

0.3.8

1 year ago

0.3.7

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.4

1 year ago

0.2.1

2 years ago

0.2.3

2 years ago

0.2.5

1 year ago

0.2.0

2 years ago

0.1.1

2 years ago