Skip to content

Commit d522c36

Browse files
authored
Merge pull request #28 from thesbros/master
TypeScript definitions
2 parents 21f2769 + 4e46e5b commit d522c36

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"homepage": "https://github.com/javivelasco/react-css-themr#readme",
55
"version": "1.4.1",
66
"main": "./lib",
7+
"typings": "./src/index.d.ts",
78
"author": {
89
"email": "javier.velasco86@gmail.com",
910
"name": "Javi Velasco",

src/index.d.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
declare module "react-css-themr"
2+
{
3+
export interface IThemrOptions
4+
{
5+
/** @default "deeply" */
6+
composeTheme?: "deeply" | "softly" | false,
7+
/** @default false */
8+
withRef?: boolean
9+
}
10+
11+
export interface ThemeProviderProps
12+
{
13+
theme: {}
14+
}
15+
16+
export class ThemeProvider extends React.Component<ThemeProviderProps, any>
17+
{
18+
19+
}
20+
21+
export function themr(
22+
identifier: string,
23+
defaultTheme?: {},
24+
options?: IThemrOptions
25+
);
26+
}

0 commit comments

Comments
 (0)