rn-phone-input-field
Version:
A React Native phone number input component built from scratch, featuring a text input for number entry, a custom dropdown for selecting country codes, and validation logic using regex or country-specific rules. It supports formatting, localization, and s
50 lines (40 loc) • 823 B
TypeScript
import type { DimensionValue } from 'react-native';
type ContainerStyle = {
flexDirection: 'row';
alignItems: 'center';
gap: number;
borderWidth: number;
borderColor: string;
borderRadius: number;
paddingVertical: number;
paddingHorizontal: number;
flexShrink: number;
};
type FlexRowStyle = {
flexDirection: 'row';
alignItems: 'center';
gap: number;
};
type GapStyle = {
gap: number;
};
type FontSize28Style = {
fontSize: number;
};
type FontSize16Style = {
fontSize: number;
color: string;
};
type WidthStyle = {
width: DimensionValue;
};
type Styles = (isDark: boolean) => {
container: ContainerStyle;
flexRow: FlexRowStyle;
gap10: GapStyle;
ft28: FontSize28Style;
ft16: FontSize16Style;
width75: WidthStyle;
};
declare const Styles: Styles;
export default Styles;