20 lines
562 B
TypeScript
20 lines
562 B
TypeScript
export function Spinner({ label }: { label?: string }) {
|
|
return (
|
|
<div className="center muted" style={{ padding: 40 }}>
|
|
<div
|
|
style={{
|
|
width: 28,
|
|
height: 28,
|
|
border: "3px solid var(--border)",
|
|
borderTopColor: "var(--accent)",
|
|
borderRadius: "50%",
|
|
margin: "0 auto 10px",
|
|
animation: "fs-spin 0.8s linear infinite",
|
|
}}
|
|
/>
|
|
{label ?? "Загрузка…"}
|
|
<style>{`@keyframes fs-spin { to { transform: rotate(360deg); } }`}</style>
|
|
</div>
|
|
);
|
|
}
|