Skip to content

Commit 6f4096d

Browse files
committed
Add TS typings
1 parent 96182eb commit 6f4096d

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.3",
44
"description": "Simple React component to load Google Fonts.",
55
"main": "build/index.js",
6+
"typings": "src/index.d.ts",
67
"repository": "https://github.com/jakewtaylor/react-google-font-loader",
78
"author": "Jake Taylor",
89
"license": "MIT",

src/index.d.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import * as React from 'react';
2+
3+
export interface Font {
4+
font: string;
5+
weights?: number[];
6+
}
7+
8+
export interface GoogleFontLoaderProps {
9+
fonts: Font[];
10+
}
11+
12+
declare class GoogleFontLoader extends React.PureComponent<GoogleFontLoaderProps> {};
13+
14+
export default GoogleFontLoader;

0 commit comments

Comments
 (0)