-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoadingSpinner.jsx
More file actions
30 lines (27 loc) · 634 Bytes
/
Copy pathLoadingSpinner.jsx
File metadata and controls
30 lines (27 loc) · 634 Bytes
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
import React from 'react'
function LoadingSpinner({ size = 'md', className = '' }) {
const sizeClasses = {
sm: 'w-4 h-4',
md: 'w-8 h-8',
lg: 'w-12 h-12'
}
return (
<div
className={`${sizeClasses[size]} ${className}`}
style={{
border: '3px solid #f3f4f6',
borderTop: '3px solid #2563eb',
borderRadius: '50%',
animation: 'spin 1s linear infinite'
}}
>
<style>{`
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
`}</style>
</div>
)
}
export default LoadingSpinner