Skip to content

Commit facc029

Browse files
committed
feat: expose prop types
1 parent 3defdff commit facc029

3 files changed

Lines changed: 34 additions & 2 deletions

File tree

src/PhoneInput/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1+
export {
2+
CALLING_CODE_PER_COUNTRY_CODE,
3+
EXCLUDED_COUNTRIES,
4+
MASK_PER_COUNTRY,
5+
} from './constants';
16
export { PhoneInput } from './PhoneInput';
27
export { isValidNumber } from './utils';
8+
9+
export type { PhoneInputProps } from './PhoneInput.types';

src/__tests__/index.test.tsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { PhoneInput, isValidNumber } from '../';
1+
import {
2+
CALLING_CODE_PER_COUNTRY_CODE,
3+
EXCLUDED_COUNTRIES,
4+
MASK_PER_COUNTRY,
5+
PhoneInput,
6+
isValidNumber,
7+
} from '../';
28

39
describe('Package exports', () => {
410
it('should export PhoneInput component', () => {
@@ -10,4 +16,16 @@ describe('Package exports', () => {
1016
expect(isValidNumber).toBeDefined();
1117
expect(typeof isValidNumber).toBe('function');
1218
});
19+
20+
it('should export calling codes', () => {
21+
expect(CALLING_CODE_PER_COUNTRY_CODE).toBeDefined();
22+
});
23+
24+
it('should export excluded countries', () => {
25+
expect(EXCLUDED_COUNTRIES).toBeDefined();
26+
});
27+
28+
it('should export masks', () => {
29+
expect(MASK_PER_COUNTRY).toBeDefined();
30+
});
1331
});

src/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
export { isValidNumber, PhoneInput } from './PhoneInput';
1+
export {
2+
CALLING_CODE_PER_COUNTRY_CODE,
3+
EXCLUDED_COUNTRIES,
4+
isValidNumber,
5+
MASK_PER_COUNTRY,
6+
PhoneInput,
7+
type PhoneInputProps,
8+
} from './PhoneInput';

0 commit comments

Comments
 (0)