mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-05-06 05:48:41 +00:00
746f890d65
- Adjusted hover shadow effects in CycleTransferStatsClient for better visual feedback. - Fixed aspect ratio class in GlobalMap for consistent rendering. - Updated font weight in GroupSwitch for improved readability. - Modified Separator width class in Header for consistency across components. - Enhanced button hover effects in NetworkChartClient for better user interaction. - Adjusted margin class in ServerDetailOverview for better alignment. - Updated margin classes in ServerOverview for consistent spacing. - Refined background gradient classes in ServiceTrackerClient for better color management. - Standardized font weight in TabSwitch for consistency. - Corrected stroke color class in AnimatedCircularProgressBar for better theming. - Improved focus outline handling in badge and button components for better accessibility. - Updated chart component styles for improved visual hierarchy. - Adjusted checkbox focus outline for better accessibility. - Enhanced command dialog styles for improved usability. - Updated dialog close button focus outline for better accessibility. - Refined dropdown menu styles for improved usability and consistency. - Adjusted input focus outline for better accessibility. - Improved popover content styles for better visibility. - Updated select component styles for improved usability. - Refined separator height classes for consistency. - Enhanced switch component focus outline for better accessibility. - Updated table footer styles for improved visual consistency. - Refactored global CSS to use new Tailwind CSS configuration and improved theming. - Removed outdated Tailwind configuration file.
43 lines
1.7 KiB
TypeScript
43 lines
1.7 KiB
TypeScript
import { cn } from "@/lib/utils"
|
|
import { Slot } from "@radix-ui/react-slot"
|
|
import { type VariantProps, cva } from "class-variance-authority"
|
|
import * as React from "react"
|
|
|
|
const buttonVariants = cva(
|
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
{
|
|
variants: {
|
|
variant: {
|
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
link: "text-primary underline-offset-4 hover:underline",
|
|
},
|
|
size: {
|
|
default: "h-10 px-4 py-2",
|
|
sm: "h-9 rounded-md px-3",
|
|
lg: "h-11 rounded-md px-8",
|
|
icon: "h-10 w-10",
|
|
},
|
|
},
|
|
defaultVariants: {
|
|
variant: "default",
|
|
size: "default",
|
|
},
|
|
},
|
|
)
|
|
|
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
asChild?: boolean
|
|
}
|
|
|
|
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
const Comp = asChild ? Slot : "button"
|
|
return <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />
|
|
})
|
|
Button.displayName = "Button"
|
|
|
|
export { Button, buttonVariants }
|