mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-14 04:09:14 +00:00
relevant files to review: \- memory-graph.tsx \- spaces-dropdown.tsx \- spaces-dropdown.css.ts
24 lines
578 B
TypeScript
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 }
|