supermemory/packages/memory-graph/src/ui/button.tsx
nexxeln dfb0c05ab3 add spaces selector with search (#600)
relevant files to review:
\- memory-graph.tsx
\- spaces-dropdown.tsx
\- spaces-dropdown.css.ts
2025-12-02 18:37:24 +00:00

24 lines
578 B
TypeScript

import { Slot } from "@radix-ui/react-slot"
import type * as React from "react"
import { button, type ButtonVariants } from "./button.css"
function Button({
className,
variant,
size,
asChild = false,
...props
}: React.ComponentProps<"button"> &
ButtonVariants & {
asChild?: boolean
}) {
const Comp = asChild ? Slot : "button"
const combinedClassName = className
? `${button({ variant, size })} ${className}`
: button({ variant, size })
return <Comp className={combinedClassName} data-slot="button" {...props} />
}
export { Button, button as buttonVariants }