diff options
Diffstat (limited to 'packages/memory-graph/src/ui/badge.tsx')
| -rw-r--r-- | packages/memory-graph/src/ui/badge.tsx | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/packages/memory-graph/src/ui/badge.tsx b/packages/memory-graph/src/ui/badge.tsx index 0708888f..a08578c3 100644 --- a/packages/memory-graph/src/ui/badge.tsx +++ b/packages/memory-graph/src/ui/badge.tsx @@ -1,27 +1,20 @@ -import { Slot } from "@radix-ui/react-slot"; -import type * as React from "react"; -import { badge, type BadgeVariants } from "./badge.css"; +import { Slot } from "@radix-ui/react-slot" +import type * as React from "react" +import { badge, type BadgeVariants } from "./badge.css" function Badge({ className, variant, asChild = false, ...props -}: React.ComponentProps<"span"> & - BadgeVariants & { asChild?: boolean }) { - const Comp = asChild ? Slot : "span"; +}: React.ComponentProps<"span"> & BadgeVariants & { asChild?: boolean }) { + const Comp = asChild ? Slot : "span" const combinedClassName = className ? `${badge({ variant })} ${className}` - : badge({ variant }); + : badge({ variant }) - return ( - <Comp - className={combinedClassName} - data-slot="badge" - {...props} - /> - ); + return <Comp className={combinedClassName} data-slot="badge" {...props} /> } -export { Badge, badge as badgeVariants }; +export { Badge, badge as badgeVariants } |