Files
OpenFlare/frontend/app/(main)/nodes/components/node-status-badge.tsx
T
ryan 63cd906cfc refactor(repo): consolidate openflare-server to root and move subprojects to internal/apps
- Merge all files inside openflare-server to the repository root directory.
- Relocate agent, relay, and flared subprojects from internal/ to internal/apps/.
- Combine docker-compose files and update build context paths to root.
- Update GitHub workflows and Dockerfiles to refer to new directories and package names.
- Rewrite Go package imports across all files.
- Resolve database renew test race condition and clean up docs.
2026-06-19 14:23:29 +08:00

31 lines
768 B
TypeScript

import {Badge} from '@/components/ui/badge';
import {cn} from '@/lib/utils';
import type {StatusTone} from './node-utils';
const toneClassName: Record<StatusTone, string> = {
success: 'bg-emerald-500/10 border-emerald-500/20 text-emerald-600',
warning: 'bg-amber-500/10 border-amber-500/20 text-amber-600',
danger: 'bg-destructive/10 border-destructive/20 text-destructive',
info: 'bg-blue-500/10 border-blue-500/20 text-blue-600',
};
export function NodeStatusBadge({
label,
tone,
className,
}: {
label: string;
tone: StatusTone;
className?: string;
}) {
return (
<Badge
variant="outline"
className={cn('text-[10px] rounded-full py-0 px-2 font-medium', toneClassName[tone], className)}
>
{label}
</Badge>
);
}