diff options
Diffstat (limited to 'packages/memory-graph/src/ui/button.tsx')
| -rw-r--r-- | packages/memory-graph/src/ui/button.tsx | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/packages/memory-graph/src/ui/button.tsx b/packages/memory-graph/src/ui/button.tsx index 031f2cc8..89015299 100644 --- a/packages/memory-graph/src/ui/button.tsx +++ b/packages/memory-graph/src/ui/button.tsx @@ -1,6 +1,6 @@ -import { Slot } from "@radix-ui/react-slot"; -import type * as React from "react"; -import { button, type ButtonVariants } from "./button.css"; +import { Slot } from "@radix-ui/react-slot" +import type * as React from "react" +import { button, type ButtonVariants } from "./button.css" function Button({ className, @@ -10,21 +10,15 @@ function Button({ ...props }: React.ComponentProps<"button"> & ButtonVariants & { - asChild?: boolean; + asChild?: boolean }) { - const Comp = asChild ? Slot : "button"; + const Comp = asChild ? Slot : "button" const combinedClassName = className ? `${button({ variant, size })} ${className}` - : button({ variant, size }); + : button({ variant, size }) - return ( - <Comp - className={combinedClassName} - data-slot="button" - {...props} - /> - ); + return <Comp className={combinedClassName} data-slot="button" {...props} /> } -export { Button, button as buttonVariants }; +export { Button, button as buttonVariants } |