mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-12 18:29:45 +00:00
* Update ScriptAccordion and ScriptItem components for improved styling * Add README.md for Proxmox VE Helper-Scripts Frontend * Remove testing dependencies and related test files from the frontend project * Update analytics URL in siteConfig to point to community-scripts.org * Refactor ESLint configuration to have one source of truth and run "npm lint" to apply new changes * Update lint script in package.json to remove npm * Add 'next' option to ESLint configuration for improved compatibility * Update package dependencies and versions in package.json and package-lock.json * Refactor theme provider import and enhance calendar component for dynamic icon rendering * rename sidebar, alerts and buttons * rename description and interfaces files * rename more files * change folder name * Refactor tooltip logic to improve updateable condition handling * Enhance CommandMenu to prevent duplicate scripts across categories * Remove test step from frontend CI/CD workflow
39 lines
1.3 KiB
TypeScript
39 lines
1.3 KiB
TypeScript
import type { VariantProps } from "class-variance-authority";
|
|
|
|
import { cva } from "class-variance-authority";
|
|
import * as React from "react";
|
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
const badgeVariants = cva(
|
|
"inline-flex items-center rounded-full border px-1.5 py-0.1 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
{
|
|
variants: {
|
|
variant: {
|
|
default:
|
|
"border-transparent text-primary-foreground border-primary-foreground",
|
|
secondary:
|
|
"border-transparent text-secondary-foreground border-secondary-foreground",
|
|
destructive:
|
|
"border-transparent text-destructive-foreground border-destructive-foreground",
|
|
outline: "text-foreground",
|
|
success: "text-green-500 border-green-500",
|
|
warning: "text-yellow-500 border-yellow-500",
|
|
failure: "text-red-500 border-red-500",
|
|
},
|
|
},
|
|
defaultVariants: {
|
|
variant: "default",
|
|
},
|
|
},
|
|
);
|
|
|
|
export type BadgeProps = {} & React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof badgeVariants>;
|
|
|
|
function Badge({ className, variant, ...props }: BadgeProps) {
|
|
return (
|
|
<div className={cn(badgeVariants({ variant }), className)} {...props} />
|
|
);
|
|
}
|
|
|
|
export { Badge, badgeVariants };
|