refactor(ui): replace custom icon spinner with inline svg in Loading component
- remove Recycle03Icon dependency and use native svg spinner - adjust size values for sm, md, and lg variants - update loading text from "Loading...." to "Chargement"
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
'use client';
|
||||
|
||||
import React from 'react';
|
||||
import { Recycle03Icon } from '../icons/index.js';
|
||||
|
||||
const Loading = ({ size = 'md' }) => {
|
||||
const sizes = {
|
||||
sm: 'w-6 h-6',
|
||||
md: 'w-10 h-10',
|
||||
lg: 'w-16 h-16'
|
||||
sm: 'w-5 h-5',
|
||||
md: 'w-8 h-8',
|
||||
lg: 'w-12 h-12'
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex flex-col items-center justify-center gap-3 text-neutral-600 dark:text-neutral-400">
|
||||
<div className="animate-spin">
|
||||
<Recycle03Icon className={sizes[size]} />
|
||||
</div>
|
||||
<p className="text-sm">Loading....</p>
|
||||
<svg className={`${sizes[size]} animate-spin`} viewBox="0 0 24 24" fill="none">
|
||||
<circle cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="2" strokeOpacity="0.15" />
|
||||
<path d="M12 2 a10 10 0 0 1 10 10" stroke="currentColor" strokeWidth="2" strokeLinecap="round" />
|
||||
</svg>
|
||||
<p className="text-sm">Chargement</p>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user