-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyled.d.ts
139 lines (121 loc) · 3.06 KB
/
styled.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// import original module declarations
import { Direction } from "moerabaya-components";
import { ReactElement } from "react";
import { LinkProps as NextLinkProps } from "next/link";
import "styled-components";
// and extend them!
declare module "styled-components" {
export interface DefaultTheme {
borderRadius: string;
grid: {
gutter: string;
padding: string;
};
colors: {
font: string;
background: string;
};
screens: {
[key: string]: string;
};
breakpoints: {
[key: string]: string;
};
}
export type ScreenSizes = "xlg" | "lg" | "md" | "sm" | "all";
export interface GlobalStyleProps {
direction: Direction;
}
export interface ComponentProps {
hide?: ScreenSizes[] | ScreenSizes;
show?: ScreenSizes[] | ScreenSizes;
p?: string;
m?: string;
}
export interface GridProps extends ComponentProps {
fluid?: ScreenSizes[] | ScreenSizes;
}
export interface FlexComponentProps extends ComponentProps {
fullHeight?: boolean;
alignItems?: "flex-start" | "flex-end" | "center";
justifyContent?: "flex-start" | "flex-end" | "center";
direction?: "row" | "row-reverse" | "column" | "column-reverse";
}
export interface TextProps extends ComponentProps {
opacity?: number = 1;
smallCaps?: boolean;
textTransform?: "uppercase" | "lowercase";
align?: "center" | "start" | "end" | "left" | "right";
/**
* number is in pixels
*/
size?: number | string | "inherit" | "initial";
weight?:
| 100
| 200
| 300
| 400
| 500
| 600
| 700
| 800
| 900
| "lighter"
| "light"
| "normal"
| "bold"
| "bolder";
onHover?: {};
}
export interface AnimateProps {
name: "wave";
/**
* number is in milliseconds
*/
duration: number | string;
iteration: number | "infinite";
/**
* number is in milliseconds
*/
delay: number | string;
/**
* transform origin which allows the change the point that transformation occurs
*/
origin: string;
}
export interface IconProps {
size: number | string;
slot?: "start" | "end" | "left" | "right";
}
export interface ButtonComponent
extends ComponentProps,
React.HTMLProps<HTMLAnchorElement> {
size?: "sm" | "md" | "lg" = "sm";
isActive?: boolean = false;
smallCaps?: boolean = false;
alternative?: boolean = false;
layout?: "full" | "block";
href?: string;
}
export interface MenuItemComponent extends ComponentProps {
active?: boolean = false;
}
export interface LinkProps
extends TextProps,
NextLinkProps,
React.HTMLProps<HTMLAnchorElement> {
animated?: boolean = false;
href: Url;
// target?: "_blank" | "_self" | "_parent" | "_top";
children?: ReactElement | string;
}
export interface RowProps extends FlexComponentProps {
wrap?: boolean = true;
}
export interface ColProps extends ComponentProps {
sm?: number;
md?: number;
lg?: number;
xl?: number;
}
}