Revert Command changes

This seems to rely on these specific styles and it works, so we'll leave it alone for now.
This commit is contained in:
Justin Edmund 2023-07-02 02:17:51 -07:00
parent 9dd3260761
commit 619eff2ad7

View file

@ -20,7 +20,7 @@ interface CommandDialogProps extends DialogProps {}
const CommandDialog = ({ children, ...props }: CommandDialogProps) => { const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
return ( return (
<Dialog {...props}> <Dialog {...props}>
<DialogContent className={styles.dialogContent}> <DialogContent className="DialogContent">
<Command>{children}</Command> <Command>{children}</Command>
</DialogContent> </DialogContent>
</Dialog> </Dialog>
@ -34,10 +34,7 @@ const CommandInput = forwardRef<
<div> <div>
<CommandPrimitive.Input <CommandPrimitive.Input
ref={ref} ref={ref}
className={classNames( className={classNames({ CommandInput: true }, className)}
{ CommandInput: true },
className?.split(' ').map((c) => styles[c])
)}
{...props} {...props}
/> />
</div> </div>
@ -51,10 +48,7 @@ const CommandList = forwardRef<
>(({ className, ...props }, ref) => ( >(({ className, ...props }, ref) => (
<CommandPrimitive.List <CommandPrimitive.List
ref={ref} ref={ref}
className={classNames( className={classNames({ CommandList: true }, className)}
{ CommandList: true },
className?.split(' ').map((c) => styles[c])
)}
{...props} {...props}
/> />
)) ))
@ -65,7 +59,7 @@ const CommandEmpty = forwardRef<
React.ElementRef<typeof CommandPrimitive.Empty>, React.ElementRef<typeof CommandPrimitive.Empty>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty> React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>
>((props, ref) => ( >((props, ref) => (
<CommandPrimitive.Empty ref={ref} className={styles.empty} {...props} /> <CommandPrimitive.Empty ref={ref} className="CommandEmpty" {...props} />
)) ))
CommandEmpty.displayName = CommandPrimitive.Empty.displayName CommandEmpty.displayName = CommandPrimitive.Empty.displayName
@ -76,10 +70,7 @@ const CommandGroup = forwardRef<
>(({ className, ...props }, ref) => ( >(({ className, ...props }, ref) => (
<CommandPrimitive.Group <CommandPrimitive.Group
ref={ref} ref={ref}
className={classNames( className={classNames({ CommandGroup: true }, className)}
{ CommandGroup: true },
className?.split(' ').map((c) => styles[c])
)}
{...props} {...props}
/> />
)) ))
@ -92,10 +83,7 @@ const CommandSeparator = forwardRef<
>(({ className, ...props }, ref) => ( >(({ className, ...props }, ref) => (
<CommandPrimitive.Separator <CommandPrimitive.Separator
ref={ref} ref={ref}
className={classNames( className={classNames({ CommandSeparator: true }, className)}
{ CommandSeparator: true },
className?.split(' ').map((c) => styles[c])
)}
{...props} {...props}
/> />
)) ))
@ -107,10 +95,7 @@ const CommandItem = forwardRef<
>(({ className, ...props }, ref) => ( >(({ className, ...props }, ref) => (
<CommandPrimitive.Item <CommandPrimitive.Item
ref={ref} ref={ref}
className={classNames( className={classNames({ CommandItem: true }, className)}
{ CommandItem: true },
className?.split(' ').map((c) => styles[c])
)}
{...props} {...props}
/> />
)) ))
@ -123,10 +108,7 @@ const CommandShortcut = ({
}: React.HTMLAttributes<HTMLSpanElement>) => { }: React.HTMLAttributes<HTMLSpanElement>) => {
return ( return (
<span <span
className={classNames( className={classNames({ CommandShortcut: true }, className)}
{ CommandShortcut: true },
className?.split(' ').map((c) => styles[c])
)}
{...props} {...props}
/> />
) )