mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-17 02:01:29 +10:00
fix issue with missing DialogTitle/DialogDescription, fix issue with hot reloads
This commit is contained in:
@ -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>
|
||||
|
||||
@ -34,3 +34,4 @@ export * from "./toast";
|
||||
export * from "./toggle";
|
||||
export * from "./toggle-group";
|
||||
export * from "./tooltip";
|
||||
export * from "./visually-hidden";
|
||||
|
||||
3
libs/ui/src/components/visually-hidden.tsx
Normal file
3
libs/ui/src/components/visually-hidden.tsx
Normal file
@ -0,0 +1,3 @@
|
||||
import * as VisuallyHiddenPrimitive from "@radix-ui/react-visually-hidden";
|
||||
|
||||
export const VisuallyHidden = VisuallyHiddenPrimitive.Root;
|
||||
Reference in New Issue
Block a user