fix issue with missing DialogTitle/DialogDescription, fix issue with hot reloads

This commit is contained in:
Amruth Pillai
2025-01-19 22:01:37 +01:00
parent 18cf814779
commit 460a40711e
27 changed files with 136 additions and 277 deletions

View File

@ -1,11 +1,8 @@
import { MagnifyingGlass } from "@phosphor-icons/react";
import type { DialogProps } from "@radix-ui/react-dialog";
import { cn } from "@reactive-resume/utils";
import { Command as CommandPrimitive } from "cmdk";
import { forwardRef } from "react";
import { Dialog, DialogContent } from "./dialog";
export const Command = forwardRef<
React.ElementRef<typeof CommandPrimitive>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive>
@ -19,18 +16,6 @@ export const Command = forwardRef<
Command.displayName = CommandPrimitive.displayName;
type CommandDialogProps = DialogProps;
export const CommandDialog = ({ children, ...props }: CommandDialogProps) => (
<Dialog {...props}>
<DialogContent className="overflow-hidden p-0">
<Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-secondary [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5">
{children}
</Command>
</DialogContent>
</Dialog>
);
export const CommandInput = forwardRef<
React.ElementRef<typeof CommandPrimitive.Input>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>

View File

@ -34,3 +34,4 @@ export * from "./toast";
export * from "./toggle";
export * from "./toggle-group";
export * from "./tooltip";
export * from "./visually-hidden";

View File

@ -0,0 +1,3 @@
import * as VisuallyHiddenPrimitive from "@radix-ui/react-visually-hidden";
export const VisuallyHidden = VisuallyHiddenPrimitive.Root;