We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 16a5cb1 + 098f812 commit 31d8c45Copy full SHA for 31d8c45
src/countryCodes.ts
@@ -252,6 +252,6 @@ const countryCodes = [
252
'GB-WLS',
253
'GB-ZET',
254
'US-CA',
255
-];
+] as const;
256
257
export default countryCodes;
src/index.tsx
@@ -1,8 +1,10 @@
1
import React, { FC, HTMLAttributes } from 'react';
2
import countryCodes from './countryCodes';
3
4
+export type CountryCode = typeof countryCodes[number];
5
+
6
export interface Props extends HTMLAttributes<HTMLImageElement> {
- country?: string;
7
+ country?: CountryCode | Omit<string, CountryCode>;
8
role?: string;
9
size?: number;
10
alt?: string;
0 commit comments