Skip to content

Commit

Permalink
hmm?
Browse files Browse the repository at this point in the history
  • Loading branch information
RiskyMH committed Nov 22, 2024
1 parent 89650dd commit 6742e10
Show file tree
Hide file tree
Showing 17 changed files with 55 additions and 55 deletions.
6 changes: 3 additions & 3 deletions app/components/ui/avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Avatar = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root> & {
ref: React.RefObject<React.ElementRef<typeof AvatarPrimitive.Root>>;
ref?: React.RefObject<React.ElementRef<typeof AvatarPrimitive.Root>>;
}) => (
<AvatarPrimitive.Root
ref={ref}
Expand All @@ -25,7 +25,7 @@ const AvatarImage = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image> & {
ref: React.RefObject<React.ElementRef<typeof AvatarPrimitive.Image>>;
ref?: React.RefObject<React.ElementRef<typeof AvatarPrimitive.Image>>;
}) => <AvatarPrimitive.Image ref={ref} className={cn("aspect-square size-full", className)} {...props} />;
AvatarImage.displayName = AvatarPrimitive.Image.displayName;

Expand All @@ -34,7 +34,7 @@ const AvatarFallback = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback> & {
ref: React.RefObject<React.ElementRef<typeof AvatarPrimitive.Fallback>>;
ref?: React.RefObject<React.ElementRef<typeof AvatarPrimitive.Fallback>>;
}) => (
<AvatarPrimitive.Fallback
ref={ref}
Expand Down
2 changes: 1 addition & 1 deletion app/components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const Button = ({
asChild = false,
...props
}: ButtonProps & {
ref: React.RefObject<HTMLButtonElement>;
ref?: React.RefObject<HTMLButtonElement>;
}) => {
const Comp = asChild ? Slot : "button";
return <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />;
Expand Down
12 changes: 6 additions & 6 deletions app/components/ui/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Card = ({
className,
...props
}: React.HTMLAttributes<HTMLDivElement> & {
ref: React.RefObject<HTMLDivElement>;
ref?: React.RefObject<HTMLDivElement>;
}) => (
<div ref={ref} className={cn("rounded-lg border bg-card text-card-foreground shadow-sm", className)} {...props} />
);
Expand All @@ -18,7 +18,7 @@ const CardHeader = ({
className,
...props
}: React.HTMLAttributes<HTMLDivElement> & {
ref: React.RefObject<HTMLDivElement>;
ref?: React.RefObject<HTMLDivElement>;
}) => <div ref={ref} className={cn("flex flex-col gap-1.5 p-6", className)} {...props} />;
CardHeader.displayName = "CardHeader";

Expand All @@ -27,7 +27,7 @@ const CardTitle = ({
className,
...props
}: React.HTMLAttributes<HTMLHeadingElement> & {
ref: React.RefObject<HTMLParagraphElement>;
ref?: React.RefObject<HTMLParagraphElement>;
}) => <h3 ref={ref} className={cn("font-semibold text-2xl leading-none tracking-tight", className)} {...props} />;
CardTitle.displayName = "CardTitle";

Expand All @@ -36,7 +36,7 @@ const CardDescription = ({
className,
...props
}: React.HTMLAttributes<HTMLParagraphElement> & {
ref: React.RefObject<HTMLParagraphElement>;
ref?: React.RefObject<HTMLParagraphElement>;
}) => <p ref={ref} className={cn("text-muted-foreground text-sm", className)} {...props} />;
CardDescription.displayName = "CardDescription";

Expand All @@ -45,7 +45,7 @@ const CardContent = ({
className,
...props
}: React.HTMLAttributes<HTMLDivElement> & {
ref: React.RefObject<HTMLDivElement>;
ref?: React.RefObject<HTMLDivElement>;
}) => <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />;
CardContent.displayName = "CardContent";

Expand All @@ -54,7 +54,7 @@ const CardFooter = ({
className,
...props
}: React.HTMLAttributes<HTMLDivElement> & {
ref: React.RefObject<HTMLDivElement>;
ref?: React.RefObject<HTMLDivElement>;
}) => <div ref={ref} className={cn("flex items-center p-6 pt-0", className)} {...props} />;
CardFooter.displayName = "CardFooter";

Expand Down
2 changes: 1 addition & 1 deletion app/components/ui/checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Checkbox = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> & {
ref: React.RefObject<React.ElementRef<typeof CheckboxPrimitive.Root>>;
ref?: React.RefObject<React.ElementRef<typeof CheckboxPrimitive.Root>>;
}) => (
<CheckboxPrimitive.Root
ref={ref}
Expand Down
10 changes: 5 additions & 5 deletions app/components/ui/context-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const ContextMenuSubContent = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent> & {
ref: React.RefObject<React.ElementRef<typeof ContextMenuPrimitive.SubContent>>;
ref?: React.RefObject<React.ElementRef<typeof ContextMenuPrimitive.SubContent>>;
}) => (
<ContextMenuPrimitive.SubContent
ref={ref}
Expand All @@ -57,7 +57,7 @@ const ContextMenuContent = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content> & {
ref: React.RefObject<React.ElementRef<typeof ContextMenuPrimitive.Content>>;
ref?: React.RefObject<React.ElementRef<typeof ContextMenuPrimitive.Content>>;
}) => (
<ContextMenuPrimitive.Portal>
<ContextMenuPrimitive.Content
Expand Down Expand Up @@ -92,7 +92,7 @@ const ContextMenuCheckboxItem = ({
checked,
...props
}: React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem> & {
ref: React.RefObject<React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>>;
ref?: React.RefObject<React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>>;
}) => (
<ContextMenuPrimitive.CheckboxItem
ref={ref}
Expand All @@ -119,7 +119,7 @@ const ContextMenuRadioItem = ({
children,
...props
}: React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem> & {
ref: React.RefObject<React.ElementRef<typeof ContextMenuPrimitive.RadioItem>>;
ref?: React.RefObject<React.ElementRef<typeof ContextMenuPrimitive.RadioItem>>;
}) => (
<ContextMenuPrimitive.RadioItem
ref={ref}
Expand Down Expand Up @@ -153,7 +153,7 @@ const ContextMenuSeparator = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator> & {
ref: React.RefObject<React.ElementRef<typeof ContextMenuPrimitive.Separator>>;
ref?: React.RefObject<React.ElementRef<typeof ContextMenuPrimitive.Separator>>;
}) => <ContextMenuPrimitive.Separator ref={ref} className={cn("-mx-1 my-1 h-px bg-border", className)} {...props} />;
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;

Expand Down
8 changes: 4 additions & 4 deletions app/components/ui/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const DialogOverlay = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay> & {
ref: React.RefObject<React.ElementRef<typeof DialogPrimitive.Overlay>>;
ref?: React.RefObject<React.ElementRef<typeof DialogPrimitive.Overlay>>;
}) => (
<DialogPrimitive.Overlay
ref={ref}
Expand All @@ -38,7 +38,7 @@ const DialogContent = ({
children,
...props
}: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {
ref: React.RefObject<React.ElementRef<typeof DialogPrimitive.Content>>;
ref?: React.RefObject<React.ElementRef<typeof DialogPrimitive.Content>>;
}) => (
<DialogPortal>
<DialogOverlay />
Expand Down Expand Up @@ -75,7 +75,7 @@ const DialogTitle = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title> & {
ref: React.RefObject<React.ElementRef<typeof DialogPrimitive.Title>>;
ref?: React.RefObject<React.ElementRef<typeof DialogPrimitive.Title>>;
}) => (
<DialogPrimitive.Title
ref={ref}
Expand All @@ -90,7 +90,7 @@ const DialogDescription = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description> & {
ref: React.RefObject<React.ElementRef<typeof DialogPrimitive.Description>>;
ref?: React.RefObject<React.ElementRef<typeof DialogPrimitive.Description>>;
}) => <DialogPrimitive.Description ref={ref} className={cn("text-muted-foreground text-sm", className)} {...props} />;
DialogDescription.displayName = DialogPrimitive.Description.displayName;

Expand Down
8 changes: 4 additions & 4 deletions app/components/ui/drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const DrawerOverlay = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay> & {
ref: React.RefObject<React.ElementRef<typeof DrawerPrimitive.Overlay>>;
ref?: React.RefObject<React.ElementRef<typeof DrawerPrimitive.Overlay>>;
}) => <DrawerPrimitive.Overlay ref={ref} className={cn("fixed inset-0 z-50 bg-black/80", className)} {...props} />;
DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;

Expand All @@ -31,7 +31,7 @@ const DrawerContent = ({
children,
...props
}: React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content> & {
ref: React.RefObject<React.ElementRef<typeof DrawerPrimitive.Content>>;
ref?: React.RefObject<React.ElementRef<typeof DrawerPrimitive.Content>>;
}) => (
<DrawerPortal>
<DrawerOverlay />
Expand Down Expand Up @@ -65,7 +65,7 @@ const DrawerTitle = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title> & {
ref: React.RefObject<React.ElementRef<typeof DrawerPrimitive.Title>>;
ref?: React.RefObject<React.ElementRef<typeof DrawerPrimitive.Title>>;
}) => (
<DrawerPrimitive.Title
ref={ref}
Expand All @@ -80,7 +80,7 @@ const DrawerDescription = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description> & {
ref: React.RefObject<React.ElementRef<typeof DrawerPrimitive.Description>>;
ref?: React.RefObject<React.ElementRef<typeof DrawerPrimitive.Description>>;
}) => <DrawerPrimitive.Description ref={ref} className={cn("text-muted-foreground text-sm", className)} {...props} />;
DrawerDescription.displayName = DrawerPrimitive.Description.displayName;

Expand Down
10 changes: 5 additions & 5 deletions app/components/ui/dropdown-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const DropdownMenuSubContent = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent> & {
ref: React.RefObject<React.ElementRef<typeof DropdownMenuPrimitive.SubContent>>;
ref?: React.RefObject<React.ElementRef<typeof DropdownMenuPrimitive.SubContent>>;
}) => (
<DropdownMenuPrimitive.SubContent
ref={ref}
Expand All @@ -58,7 +58,7 @@ const DropdownMenuContent = ({
sideOffset = 4,
...props
}: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {
ref: React.RefObject<React.ElementRef<typeof DropdownMenuPrimitive.Content>>;
ref?: React.RefObject<React.ElementRef<typeof DropdownMenuPrimitive.Content>>;
}) => (
<DropdownMenuPrimitive.Portal>
<DropdownMenuPrimitive.Content
Expand Down Expand Up @@ -94,7 +94,7 @@ const DropdownMenuCheckboxItem = ({
checked,
...props
}: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem> & {
ref: React.RefObject<React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>>;
ref?: React.RefObject<React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>>;
}) => (
<DropdownMenuPrimitive.CheckboxItem
ref={ref}
Expand All @@ -121,7 +121,7 @@ const DropdownMenuRadioItem = ({
children,
...props
}: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem> & {
ref: React.RefObject<React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>>;
ref?: React.RefObject<React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>>;
}) => (
<DropdownMenuPrimitive.RadioItem
ref={ref}
Expand Down Expand Up @@ -155,7 +155,7 @@ const DropdownMenuSeparator = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator> & {
ref: React.RefObject<React.ElementRef<typeof DropdownMenuPrimitive.Separator>>;
ref?: React.RefObject<React.ElementRef<typeof DropdownMenuPrimitive.Separator>>;
}) => (
<DropdownMenuPrimitive.Separator ref={ref} className={cn("-mx-1 my-1 h-px bg-background", className)} {...props} />
);
Expand Down
2 changes: 1 addition & 1 deletion app/components/ui/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Input = ({
type,
...props
}: InputProps & {
ref: React.RefObject<HTMLInputElement>;
ref?: React.RefObject<HTMLInputElement>;
}) => {
return (
<input
Expand Down
2 changes: 1 addition & 1 deletion app/components/ui/popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const PopoverContent = ({
sideOffset = 4,
...props
}: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {
ref: React.RefObject<React.ElementRef<typeof PopoverPrimitive.Content>>;
ref?: React.RefObject<React.ElementRef<typeof PopoverPrimitive.Content>>;
}) => (
<PopoverPrimitive.Portal>
<PopoverPrimitive.Content
Expand Down
4 changes: 2 additions & 2 deletions app/components/ui/scroll-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const ScrollArea = ({
children,
...props
}: React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & {
ref: React.RefObject<React.ElementRef<typeof ScrollAreaPrimitive.Root>>;
ref?: React.RefObject<React.ElementRef<typeof ScrollAreaPrimitive.Root>>;
}) => (
<ScrollAreaPrimitive.Root ref={ref} className={cn("relative overflow-hidden", className)} {...props}>
<ScrollAreaPrimitive.Viewport className="size-full rounded-[inherit]">{children}</ScrollAreaPrimitive.Viewport>
Expand All @@ -27,7 +27,7 @@ const ScrollBar = ({
orientation = "vertical",
...props
}: React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar> & {
ref: React.RefObject<React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>>;
ref?: React.RefObject<React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>>;
}) => (
<ScrollAreaPrimitive.ScrollAreaScrollbar
ref={ref}
Expand Down
14 changes: 7 additions & 7 deletions app/components/ui/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const SelectTrigger = ({
children,
...props
}: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> & {
ref: React.RefObject<React.ElementRef<typeof SelectPrimitive.Trigger>>;
ref?: React.RefObject<React.ElementRef<typeof SelectPrimitive.Trigger>>;
}) => (
<SelectPrimitive.Trigger
ref={ref}
Expand All @@ -41,7 +41,7 @@ const SelectScrollUpButton = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton> & {
ref: React.RefObject<React.ElementRef<typeof SelectPrimitive.ScrollUpButton>>;
ref?: React.RefObject<React.ElementRef<typeof SelectPrimitive.ScrollUpButton>>;
}) => (
<SelectPrimitive.ScrollUpButton
ref={ref}
Expand All @@ -58,7 +58,7 @@ const SelectScrollDownButton = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton> & {
ref: React.RefObject<React.ElementRef<typeof SelectPrimitive.ScrollDownButton>>;
ref?: React.RefObject<React.ElementRef<typeof SelectPrimitive.ScrollDownButton>>;
}) => (
<SelectPrimitive.ScrollDownButton
ref={ref}
Expand All @@ -77,7 +77,7 @@ const SelectContent = ({
position = "popper",
...props
}: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> & {
ref: React.RefObject<React.ElementRef<typeof SelectPrimitive.Content>>;
ref?: React.RefObject<React.ElementRef<typeof SelectPrimitive.Content>>;
}) => (
<SelectPrimitive.Portal>
<SelectPrimitive.Content
Expand Down Expand Up @@ -112,7 +112,7 @@ const SelectLabel = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label> & {
ref: React.RefObject<React.ElementRef<typeof SelectPrimitive.Label>>;
ref?: React.RefObject<React.ElementRef<typeof SelectPrimitive.Label>>;
}) => (
<SelectPrimitive.Label ref={ref} className={cn("py-1.5 pr-2 pl-8 font-semibold text-sm", className)} {...props} />
);
Expand All @@ -124,7 +124,7 @@ const SelectItem = ({
children,
...props
}: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item> & {
ref: React.RefObject<React.ElementRef<typeof SelectPrimitive.Item>>;
ref?: React.RefObject<React.ElementRef<typeof SelectPrimitive.Item>>;
}) => (
<SelectPrimitive.Item
ref={ref}
Expand All @@ -149,7 +149,7 @@ const SelectSeparator = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator> & {
ref: React.RefObject<React.ElementRef<typeof SelectPrimitive.Separator>>;
ref?: React.RefObject<React.ElementRef<typeof SelectPrimitive.Separator>>;
}) => <SelectPrimitive.Separator ref={ref} className={cn("-mx-1 my-1 h-px bg-muted", className)} {...props} />;
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;

Expand Down
8 changes: 4 additions & 4 deletions app/components/ui/sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const SheetOverlay = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay> & {
ref: React.RefObject<React.ElementRef<typeof SheetPrimitive.Overlay>>;
ref?: React.RefObject<React.ElementRef<typeof SheetPrimitive.Overlay>>;
}) => (
<SheetPrimitive.Overlay
className={cn(
Expand Down Expand Up @@ -61,7 +61,7 @@ const SheetContent = ({
children,
...props
}: SheetContentProps & {
ref: React.RefObject<React.ElementRef<typeof SheetPrimitive.Content>>;
ref?: React.RefObject<React.ElementRef<typeof SheetPrimitive.Content>>;
}) => (
<SheetPortal>
<SheetOverlay />
Expand Down Expand Up @@ -91,7 +91,7 @@ const SheetTitle = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title> & {
ref: React.RefObject<React.ElementRef<typeof SheetPrimitive.Title>>;
ref?: React.RefObject<React.ElementRef<typeof SheetPrimitive.Title>>;
}) => <SheetPrimitive.Title ref={ref} className={cn("font-semibold text-foreground text-lg", className)} {...props} />;
SheetTitle.displayName = SheetPrimitive.Title.displayName;

Expand All @@ -100,7 +100,7 @@ const SheetDescription = ({
className,
...props
}: React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description> & {
ref: React.RefObject<React.ElementRef<typeof SheetPrimitive.Description>>;
ref?: React.RefObject<React.ElementRef<typeof SheetPrimitive.Description>>;
}) => <SheetPrimitive.Description ref={ref} className={cn("text-muted-foreground text-sm", className)} {...props} />;
SheetDescription.displayName = SheetPrimitive.Description.displayName;

Expand Down
Loading

0 comments on commit 6742e10

Please sign in to comment.