@@ -5,22 +5,51 @@ interface LoaderProps {
5
5
gradientMid : string
6
6
gradientBot : string
7
7
width : string
8
+ height : string
8
9
}
9
10
10
11
interface CustomLoaderProps {
11
12
width : number
13
+ height : number
12
14
unit ?: string
13
15
}
14
16
15
- const CircularLoader = ( props : LoaderProps ) => {
17
+ export const XLoader = ( props : LoaderProps ) => {
16
18
return (
17
19
< div class = "spinner" >
18
20
< svg
19
21
viewBox = "0 0 100 100"
22
+ fill = "none"
20
23
xmlns = "http://www.w3.org/2000/svg"
21
- class = "shape"
22
24
preserveAspectRatio = "none"
23
- style = { { width : props . width } } >
25
+ width = { props . width }
26
+ height = { props . height } >
27
+ < defs >
28
+ < linearGradient id = "x-shape-gradient" x2 = "0.35" y2 = "1" >
29
+ < stop offset = "0%" stop-color = { props . gradient } />
30
+ < stop offset = "30%" stop-color = { props . gradientMid } />
31
+ < stop offset = "100%" stop-color = { props . gradientBot } />
32
+ </ linearGradient >
33
+ </ defs >
34
+ < path
35
+ d = "M76.4969 11.3291C78.7942 8.54415 78.4233 4.40773 75.6653 2.08829C74.4498 1.06618 72.9739 0.566208 71.5073 0.566208C69.6443 0.566208 67.7962 1.37052 66.5125 2.9287L39 36.4307L11.4969 3.10548C10.2115 1.54812 8.36469 0.742981 6.50204 0.742981C5.03568 0.742981 3.56079 1.24297 2.34407 2.26508C-0.414369 4.5845 -0.786088 8.72093 1.51247 11.5059L30.539 46.6768L1.5076 81.6709C-0.790353 84.4559 -0.419041 88.5923 2.34001 90.9117C5.09438 93.2373 9.19141 92.8633 11.4928 90.0721L39 56.7539L66.5031 90.0791C68.7984 92.8641 72.8975 93.2414 75.6559 90.9187C78.4144 88.5993 78.7861 84.4628 76.4875 81.6779L47.461 46.507L76.4969 11.3291Z"
36
+ fill = "url(#x-shape-gradient)"
37
+ />
38
+ </ svg >
39
+ </ div >
40
+ )
41
+ }
42
+
43
+ export const CircularLoader = ( props : LoaderProps ) => {
44
+ return (
45
+ < div class = "spinner" >
46
+ < svg
47
+ viewBox = "0 0 100 100"
48
+ xmlns = "http://www.w3.org/2000/svg"
49
+ class = "shape"
50
+ width = { props . width }
51
+ height = { props . height }
52
+ preserveAspectRatio = "none" >
24
53
< defs >
25
54
< linearGradient id = "shape-gradient" x2 = "0.35" y2 = "1" >
26
55
< stop offset = "0%" stop-color = { props . gradient } />
@@ -44,9 +73,22 @@ export const OrangeLoader = (props: CustomLoaderProps) => {
44
73
gradientMid = "rgba(255, 153, 0, 0.594)"
45
74
gradientBot = "rgba(255, 153, 0, 0.144)"
46
75
width = { `${ props . width } ${ props . unit || 'px' } ` }
76
+ height = { `${ props . height } ${ props . unit || 'px' } ` }
47
77
/>
48
78
</ div >
49
79
)
50
80
}
51
81
52
- export default CircularLoader
82
+ export const MagentaLoader = ( props : CustomLoaderProps ) => {
83
+ return (
84
+ < div class = "flex justify-center items-center" >
85
+ < XLoader
86
+ gradient = "magenta"
87
+ gradientMid = "rgba(255, 0, 255, 0.594)"
88
+ gradientBot = "rgba(255, 0, 255, 0.144)"
89
+ width = { `${ props . width } ${ props . unit || 'px' } ` }
90
+ height = { `${ props . height } ${ props . unit || 'px' } ` }
91
+ />
92
+ </ div >
93
+ )
94
+ }
0 commit comments