|
1 | 1 | import * as React from "react";
|
2 | 2 |
|
3 |
| -declare module "react-css-themr" |
4 |
| -{ |
5 |
| - export interface IThemrOptions |
6 |
| - { |
7 |
| - /** @default "deeply" */ |
8 |
| - composeTheme?: "deeply" | "softly" | false, |
9 |
| - } |
10 |
| - |
11 |
| - export interface ThemeProviderProps |
12 |
| - { |
| 3 | +declare module "react-css-themr" { |
| 4 | + type TReactCSSThemrTheme = { |
| 5 | + [key: string]: string | TReactCSSThemrTheme |
| 6 | + } |
| 7 | + |
| 8 | + export function themeable(...themes: Array<TReactCSSThemrTheme>): TReactCSSThemrTheme; |
| 9 | + |
| 10 | + export interface IThemrOptions { |
| 11 | + /** @default "deeply" */ |
| 12 | + composeTheme?: "deeply" | "softly" | false, |
| 13 | + } |
| 14 | + |
| 15 | + export interface ThemeProviderProps { |
13 | 16 | innerRef?: Function,
|
14 |
| - theme: {} |
15 |
| - } |
| 17 | + theme: {} |
| 18 | + } |
16 | 19 |
|
17 |
| - export class ThemeProvider extends React.Component<ThemeProviderProps, any> |
18 |
| - { |
| 20 | + export class ThemeProvider extends React.Component<ThemeProviderProps, any> { |
19 | 21 |
|
20 |
| - } |
| 22 | + } |
21 | 23 |
|
22 |
| - interface ThemedComponent<P, S> extends React.Component<P, S> |
23 |
| - { |
| 24 | + interface ThemedComponent<P, S> extends React.Component<P, S> { |
24 | 25 |
|
25 |
| - } |
| 26 | + } |
26 | 27 |
|
27 |
| - interface ThemedComponentClass<P, S> extends React.ComponentClass<P> |
28 |
| - { |
29 |
| - new(props?: P, context?: any): ThemedComponent<P, S>; |
30 |
| - } |
| 28 | + interface ThemedComponentClass<P, S> extends React.ComponentClass<P> { |
| 29 | + new(props?: P, context?: any): ThemedComponent<P, S>; |
| 30 | + } |
31 | 31 |
|
32 |
| - export function themr( |
33 |
| - identifier: string, |
34 |
| - defaultTheme?: {}, |
35 |
| - options?: IThemrOptions |
36 |
| - ): <P, S>(component: new(props?: P, context?: any) => React.Component<P, S>) => ThemedComponentClass<P, S>; |
| 32 | + export function themr( |
| 33 | + identifier: string, |
| 34 | + defaultTheme?: {}, |
| 35 | + options?: IThemrOptions |
| 36 | + ): <P, S>(component: new(props?: P, context?: any) => React.Component<P, S>) => ThemedComponentClass<P, S>; |
37 | 37 | }
|
0 commit comments