refactor(shadcn): use radix-ui mono-package
This commit is contained in:
parent
bdece0e21b
commit
c0aec29131
5 changed files with 10 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
|||
import { Slot } from "@radix-ui/react-slot";
|
||||
import { type VariantProps, cva } from "class-variance-authority";
|
||||
import { Slot as SlotPrimitive } from "radix-ui";
|
||||
import type * as React from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
@ -44,7 +44,7 @@ function Button({
|
|||
VariantProps<typeof buttonVariants> & {
|
||||
asChild?: boolean;
|
||||
}) {
|
||||
const Comp = asChild ? Slot : "button";
|
||||
const Comp = asChild ? SlotPrimitive.Root : "button";
|
||||
|
||||
return (
|
||||
<Comp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue