-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.ts
116 lines (103 loc) · 2.53 KB
/
types.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
/**
* Props for the BlurryGradient component.
*/
export interface BlurryGradientProps {
/**
* Optional class name for the component.
*/
className?: string;
/**
* Optional inline styles for the component.
*/
style?: React.CSSProperties;
/**
* The amount of blur to apply to the gradient items.
* Accepts any valid CSS filter blur value (e.g., '10px', '2em').
* @default '100px'
*/
blur?: string;
/**
* An array of color strings to be used in the gradient.
*/
colors?: string[];
/**
* The number of gradient items to generate.
* @default 10
*/
itemNumber?: number;
/**
* The random width range for the gradient items.
* @default [60, 80]
*/
itemWidth?: [number, number];
/**
* The unit for the width of the gradient items (e.g., 'px', '%').
* @default '%'
*/
itemWidthUnit?: string;
/**
* The random height range for the gradient items.
* @default [60, 80]
*/
itemHeight?: [number, number];
/**
* The unit for the height of the gradient items (e.g., 'px', '%').
* @default '%'
*/
itemHeightUnit?: string;
/**
* The random top range of the generated gradient item on the screen.
* @default [20, 60]
*/
itemTop?: [number, number];
/**
* The random left range of the generated gradient item on the screen.
* @default [20, 60]
*/
itemLeft?: [number, number];
/**
* The random speed range for the gradient items' animation.
* @default [50, 80]
*/
itemSpeed?: [number, number];
/**
* An array of props for individual gradient items.
* @notice If this prop is provided, the `colors` prop will be ignored.
*/
items?: BlurryGradientItemProps[];
}
export interface BlurryGradientItemProps {
/**
* The color of the gradient item.
* Accepts any valid CSS color value. including gradients. (e.g., 'linear-gradient(#FBF1F7, #B27CEE)')
*/
color: string;
/**
* Optional css `top` for the gradient item.
*/
top?: number | string;
/**
* Optional css `left` for the gradient item.
*/
left?: number | string;
/**
* Optional css `width` for the gradient item.
*/
width?: number | string;
/**
* Optional css `height` for the gradient item.
*/
height?: number | string;
/**
* Optional css `animation-duration` for the gradient item.
*/
speed?: string;
/**
* Optional css `transform` for the gradient item when animating starts.
*/
transformFrom?: string;
/**
* Optional css `transform` for the gradient item when animating ends.
*/
transformTo?: string;
}