react-country-state-city
Version:
A lightweight and easy-to-use React library that provides a comprehensive list of regions or continents, countries, states, cities languages, and country phone codes for creating dynamic and searchable dropdowns. Ideal for building forms and input fields
15 lines (14 loc) • 620 B
TypeScript
import React, { ChangeEvent, InputHTMLAttributes } from "react";
import { State } from "../types";
type PageProps = InputHTMLAttributes<HTMLInputElement> & {
containerClassName?: string;
inputClassName?: string;
onChange?: (e: State) => void;
onTextChange?: (e: ChangeEvent<HTMLInputElement>) => void;
defaultValue?: State;
countryid: number;
placeHolder?: string;
src?: string;
};
declare const StateSelect: ({ containerClassName, inputClassName, onTextChange, defaultValue, onChange, countryid, placeHolder, src, ...props }: PageProps) => React.JSX.Element;
export default StateSelect;