1 | import { ElementType, ReactElement } from 'react';
|
2 | import { PolymorphicPropsWithRef } from 'react-polymorphic-types';
|
3 | import { StyleProps, TW, StyleConfig } from 'twind/style';
|
4 | export * from 'twind/style';
|
5 |
|
6 | interface ShouldForwardProp {
|
7 | (prop: string, defaultValidatorFn: (prop: string) => boolean): boolean;
|
8 | }
|
9 | interface StyledOptions {
|
10 | shouldForwardProp?: ShouldForwardProp;
|
11 | }
|
12 | interface StyledComponent<Variants, Tag extends ElementType> {
|
13 | <T extends ElementType = Tag>(props: PolymorphicPropsWithRef<StyleProps<Variants>, T>): ReactElement<any, any> | null;
|
14 | |
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | toString(): string;
|
32 | |
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | readonly className: string;
|
46 | |
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 | readonly selector: string;
|
64 | }
|
65 | declare function styled<Variants, BaseVariants, Tag extends ElementType>(this: TW | null | undefined | void, base: StyledComponent<BaseVariants, Tag>, config?: StyledOptions & StyleConfig<Variants, BaseVariants>): StyledComponent<BaseVariants & Variants, Tag> & string;
|
66 | declare function styled<Variants, Tag extends ElementType = 'div'>(this: TW | null | undefined | void, tag?: Tag, config?: StyledOptions & StyleConfig<Variants>): StyledComponent<Variants, Tag> & string;
|
67 |
|
68 | export { ShouldForwardProp, StyledComponent, StyledOptions, styled };
|
69 |
|