2024-12-31 10:30:14 +05:30
|
|
|
import clsx from 'clsx';
|
2024-12-31 10:31:50 +05:30
|
|
|
import type { HTMLProps } from 'react';
|
2024-03-26 09:28:52 -04:00
|
|
|
|
2024-12-31 10:30:14 +05:30
|
|
|
type Props = HTMLProps<SVGElement> & {
|
2024-03-26 09:28:52 -04:00
|
|
|
readonly isOnline: boolean;
|
2024-12-31 10:30:14 +05:30
|
|
|
};
|
2024-03-26 09:28:52 -04:00
|
|
|
|
|
|
|
|
// eslint-disable-next-line unicorn/no-keyword-prefix
|
2024-12-31 10:30:14 +05:30
|
|
|
export default function StatusCircle({ isOnline, className }: Props) {
|
2024-03-26 09:28:52 -04:00
|
|
|
return (
|
|
|
|
|
<svg
|
|
|
|
|
className={clsx(
|
|
|
|
|
className,
|
|
|
|
|
isOnline
|
|
|
|
|
? 'text-green-700 dark:text-green-400'
|
2024-12-31 10:30:14 +05:30
|
|
|
: 'text-gray-300 dark:text-gray-500',
|
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
|
|
|
>
|
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
|
|
|
}
|