@@ -3,21 +3,21 @@ import {
3
3
LoaderIcon ,
4
4
LoaderPinwheelIcon ,
5
5
type LucideProps ,
6
- } from ' lucide-react' ;
7
- import { cn } from ' @/lib/utils' ;
6
+ } from " lucide-react" ;
7
+ import { cn } from " @/lib/utils" ;
8
8
9
- type SpinnerVariantProps = Omit < SpinnerProps , ' variant' > ;
9
+ type SpinnerVariantProps = Omit < SpinnerProps , " variant" > ;
10
10
11
11
const Default = ( { className, ...props } : SpinnerVariantProps ) => (
12
- < LoaderIcon className = { cn ( ' animate-spin' , className ) } { ...props } />
12
+ < LoaderIcon className = { cn ( " animate-spin" , className ) } { ...props } />
13
13
) ;
14
14
15
15
const Circle = ( { className, ...props } : SpinnerVariantProps ) => (
16
- < LoaderCircleIcon className = { cn ( ' animate-spin' , className ) } { ...props } />
16
+ < LoaderCircleIcon className = { cn ( " animate-spin" , className ) } { ...props } />
17
17
) ;
18
18
19
19
const Pinwheel = ( { className, ...props } : SpinnerVariantProps ) => (
20
- < LoaderPinwheelIcon className = { cn ( ' animate-spin' , className ) } { ...props } />
20
+ < LoaderPinwheelIcon className = { cn ( " animate-spin" , className ) } { ...props } />
21
21
) ;
22
22
23
23
const CircleFilled = ( {
@@ -28,13 +28,13 @@ const CircleFilled = ({
28
28
< div className = "relative" style = { { width : size , height : size } } >
29
29
< div className = "absolute inset-0 rotate-180" >
30
30
< LoaderCircleIcon
31
- className = { cn ( ' animate-spin' , className , ' text-foreground opacity-20' ) }
31
+ className = { cn ( " animate-spin" , className , " text-foreground opacity-20" ) }
32
32
size = { size }
33
33
{ ...props }
34
34
/>
35
35
</ div >
36
36
< LoaderCircleIcon
37
- className = { cn ( ' relative animate-spin' , className ) }
37
+ className = { cn ( " relative animate-spin" , className ) }
38
38
size = { size }
39
39
{ ...props }
40
40
/>
@@ -223,8 +223,8 @@ const Infinite = ({ size = 24, ...props }: SpinnerVariantProps) => (
223
223
strokeLinecap = "round"
224
224
strokeWidth = "10"
225
225
style = { {
226
- transform : ' scale(0.8)' ,
227
- transformOrigin : ' 50px 50px' ,
226
+ transform : " scale(0.8)" ,
227
+ transformOrigin : " 50px 50px" ,
228
228
} }
229
229
>
230
230
< animate
@@ -240,31 +240,31 @@ const Infinite = ({ size = 24, ...props }: SpinnerVariantProps) => (
240
240
241
241
export type SpinnerProps = LucideProps & {
242
242
variant ?:
243
- | ' default'
244
- | ' circle'
245
- | ' pinwheel'
246
- | ' circle-filled'
247
- | ' ellipsis'
248
- | ' ring'
249
- | ' bars'
250
- | ' infinite' ;
243
+ | " default"
244
+ | " circle"
245
+ | " pinwheel"
246
+ | " circle-filled"
247
+ | " ellipsis"
248
+ | " ring"
249
+ | " bars"
250
+ | " infinite" ;
251
251
} ;
252
252
253
253
export const Spinner = ( { variant, ...props } : SpinnerProps ) => {
254
254
switch ( variant ) {
255
- case ' circle' :
255
+ case " circle" :
256
256
return < Circle { ...props } /> ;
257
- case ' pinwheel' :
257
+ case " pinwheel" :
258
258
return < Pinwheel { ...props } /> ;
259
- case ' circle-filled' :
259
+ case " circle-filled" :
260
260
return < CircleFilled { ...props } /> ;
261
- case ' ellipsis' :
261
+ case " ellipsis" :
262
262
return < Ellipsis { ...props } /> ;
263
- case ' ring' :
263
+ case " ring" :
264
264
return < Ring { ...props } /> ;
265
- case ' bars' :
265
+ case " bars" :
266
266
return < Bars { ...props } /> ;
267
- case ' infinite' :
267
+ case " infinite" :
268
268
return < Infinite { ...props } /> ;
269
269
default :
270
270
return < Default { ...props } /> ;
0 commit comments