diff --git a/apps/dashboard/src/components/primitives/badge.tsx b/apps/dashboard/src/components/primitives/badge.tsx new file mode 100644 index 00000000000..daf68db1eea --- /dev/null +++ b/apps/dashboard/src/components/primitives/badge.tsx @@ -0,0 +1,29 @@ +import * as React from 'react'; +import { cva, type VariantProps } from 'class-variance-authority'; + +import { cn } from '@/utils/ui'; + +const badgeVariants = cva( + 'inline-flex items-center rounded-md border px-2 py-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 bg-muted text-muted-foreground', + destructive: 'border-transparent bg-destructive/10 text-destructive', + success: 'border-transparent bg-success/10 text-success', + warning: 'border-transparent bg-warning/10 text-warning', + }, + }, + defaultVariants: { + variant: 'default', + }, + } +); + +export interface BadgeProps extends React.HTMLAttributes, VariantProps {} + +function Badge({ className, variant, ...props }: BadgeProps) { + return
; +} + +export { Badge, badgeVariants }; diff --git a/apps/dashboard/src/components/primitives/button.tsx b/apps/dashboard/src/components/primitives/button.tsx index ea7f6ea3425..e0154f479d5 100644 --- a/apps/dashboard/src/components/primitives/button.tsx +++ b/apps/dashboard/src/components/primitives/button.tsx @@ -19,9 +19,9 @@ const buttonVariants = cva( }, size: { default: 'h-9 p-2.5', - sm: 'h-8 rounded-md text-xs', + sm: 'h-8 px-3 rounded-md text-xs', lg: 'h-10 rounded-md px-8', - icon: 'h-9 w-9', + icon: 'size-8', }, }, defaultVariants: { diff --git a/apps/dashboard/src/components/primitives/pagination.tsx b/apps/dashboard/src/components/primitives/pagination.tsx new file mode 100644 index 00000000000..52a8476a442 --- /dev/null +++ b/apps/dashboard/src/components/primitives/pagination.tsx @@ -0,0 +1,105 @@ +import * as React from 'react'; +import { + ChevronLeftIcon, + ChevronRightIcon, + DotsHorizontalIcon, + DoubleArrowLeftIcon, + DoubleArrowRightIcon, +} from '@radix-ui/react-icons'; + +import { cn } from '@/utils/ui'; +import { ButtonProps, buttonVariants } from '@/components/primitives/button'; + +const Pagination = ({ className, ...props }: React.ComponentProps<'nav'>) => ( +