headplane/app/components/StatusCircle.tsx

28 lines
516 B
TypeScript
Raw Normal View History

2025-02-04 17:21:03 -05:00
import cn from '~/utils/cn';
2024-03-26 09:28:52 -04:00
2025-02-04 17:21:03 -05:00
export interface StatusCircleProps {
isOnline: boolean;
className?: string;
}
2024-03-26 09:28:52 -04:00
2025-02-04 17:21:03 -05:00
export default function StatusCircle({
isOnline,
className,
}: StatusCircleProps) {
2024-03-26 09:28:52 -04:00
return (
<svg
2025-02-04 17:21:03 -05:00
className={cn(
2024-03-26 09:28:52 -04:00
isOnline
2025-02-04 17:21:03 -05:00
? 'text-green-600 dark:text-green-500'
: 'text-headplane-200 dark:text-headplane-800',
className,
2024-03-26 09:28:52 -04:00
)}
2024-12-31 10:30:14 +05:30
viewBox="0 0 24 24"
fill="currentColor"
2024-03-26 09:28:52 -04:00
>
2025-02-04 17:21:03 -05:00
<title>{isOnline ? 'Online' : 'Offline'}</title>
2024-12-31 10:30:14 +05:30
<circle cx="12" cy="12" r="8" />
2024-03-26 09:28:52 -04:00
</svg>
2024-12-31 10:30:14 +05:30
);
2024-03-26 09:28:52 -04:00
}