♻️ component refactor

This commit is contained in:
Fred KISSIE
2026-01-09 01:33:52 +01:00
parent fdb03c9626
commit 220723d25f
2 changed files with 8 additions and 17 deletions

View File

@@ -2,8 +2,6 @@
import * as React from "react"; import * as React from "react";
import { cn } from "@app/lib/cn";
import { useMediaQuery } from "@app/hooks/useMediaQuery";
import { import {
Dialog, Dialog,
DialogClose, DialogClose,
@@ -14,16 +12,9 @@ import {
DialogTitle, DialogTitle,
DialogTrigger DialogTrigger
} from "@/components/ui/dialog"; } from "@/components/ui/dialog";
import { import { DrawerClose } from "@/components/ui/drawer";
Drawer, import { useMediaQuery } from "@app/hooks/useMediaQuery";
DrawerClose, import { cn } from "@app/lib/cn";
DrawerContent,
DrawerDescription,
DrawerFooter,
DrawerHeader,
DrawerTitle,
DrawerTrigger
} from "@/components/ui/drawer";
import { import {
Sheet, Sheet,
SheetContent, SheetContent,
@@ -187,12 +178,12 @@ const CredenzaFooter = ({ className, children, ...props }: CredenzaProps) => {
export { export {
Credenza, Credenza,
CredenzaTrigger, CredenzaBody,
CredenzaClose, CredenzaClose,
CredenzaContent, CredenzaContent,
CredenzaDescription, CredenzaDescription,
CredenzaFooter,
CredenzaHeader, CredenzaHeader,
CredenzaTitle, CredenzaTitle,
CredenzaBody, CredenzaTrigger
CredenzaFooter
}; };

View File

@@ -15,7 +15,7 @@ const DialogPortal = DialogPrimitive.Portal;
const DialogClose = DialogPrimitive.Close; const DialogClose = DialogPrimitive.Close;
const DialogOverlay = React.forwardRef< const DialogOverlay = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Overlay>, React.ComponentRef<typeof DialogPrimitive.Overlay>,
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay> React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
>(({ className, ...props }, ref) => ( >(({ className, ...props }, ref) => (
<DialogPrimitive.Overlay <DialogPrimitive.Overlay
@@ -30,7 +30,7 @@ const DialogOverlay = React.forwardRef<
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName; DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
const DialogContent = React.forwardRef< const DialogContent = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Content>, React.ComponentRef<typeof DialogPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
>(({ className, children, ...props }, ref) => ( >(({ className, children, ...props }, ref) => (
<DialogPortal> <DialogPortal>