diff options
| author | nexxeln <[email protected]> | 2025-12-02 18:37:24 +0000 |
|---|---|---|
| committer | nexxeln <[email protected]> | 2025-12-02 18:37:24 +0000 |
| commit | dfb0c05ab33cb20537002eaeb896e6b2ab35af25 (patch) | |
| tree | 49ecaa46903671d96f2f9ebc5af688ab2ea2c7bd /packages/memory-graph/src/ui/badge.tsx | |
| parent | Fix: Update discord links in README.md and CONTRIBUTING.md (#598) (diff) | |
| download | supermemory-update-memory-graph.tar.xz supermemory-update-memory-graph.zip | |
add spaces selector with search (#600)update-memory-graph
relevant files to review:
\- memory-graph.tsx
\- spaces-dropdown.tsx
\- spaces-dropdown.css.ts
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 } |