Skip to content

Commit

Permalink
types adjusted
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiHotz committed May 12, 2023
1 parent 630447c commit 8ed9457
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/PhoneInput/PhoneInput.story.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import React, { FC, useState } from 'react';
import { Meta } from '@storybook/react';
import { PhoneInput } from './PhoneInput';
import { PhoneNumber, IPhoneInputProps } from '../types';
import { PhoneNumber } from '../types';

export default {
title: 'PhoneInput',
component: PhoneInput,
} as Meta<IPhoneInputProps>;
};

export const Default: FC = () => {
const [value, setValue] = useState<PhoneNumber>('');
Expand Down
6 changes: 3 additions & 3 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ export type Region =
| 'central-america'
| 'north-america';

export type NumberFormat = 'INTERNATIONAL' | 'NATIONAL';
export type DetectMobile = boolean | null | RegExpMatchArray;

export interface ICountry {
name: string;
regions: Region[];
Expand Down Expand Up @@ -71,9 +74,6 @@ export interface IPhoneInputProps {
className?: string;
}

export type NumberFormat = 'INTERNATIONAL' | 'NATIONAL';
export type DetectMobile = boolean | null | RegExpMatchArray;

export interface IPhoneNumberState {
country?: ICountry;
phoneNumber: string;
Expand Down

0 comments on commit 8ed9457

Please sign in to comment.