Skip to content

Commit

Permalink
test(snapshots): update test snapshots for consistency (#5801)
Browse files Browse the repository at this point in the history
Updated snapshot components to use `React.ComponentProps` instead of custom interfaces for `input` and `Dialog` components. This simplifies the code by leveraging built-in React types, ensuring consistency and reducing potential errors arising from custom definitions.
  • Loading branch information
Jacksonmills authored Nov 12, 2024
1 parent 8d520c8 commit 824a35a
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export function cn(...inputs: ClassValue[]) {
}
",
"path": "lib/utils.ts",
"target": "",
"type": "registry:lib",
},
{
Expand Down Expand Up @@ -238,10 +239,7 @@ export { Button, buttonVariants }
import { cn } from "@/lib/utils"
export interface InputProps
extends React.InputHTMLAttributes<HTMLInputElement> {}
const Input = React.forwardRef<HTMLInputElement, InputProps>(
const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(
({ className, type, ...props }, ref) => {
return (
<input
Expand Down Expand Up @@ -290,9 +288,7 @@ const Command = React.forwardRef<
))
Command.displayName = CommandPrimitive.displayName
interface CommandDialogProps extends DialogProps {}
const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
const CommandDialog = ({ children, ...props }: DialogProps) => {
return (
<Dialog {...props}>
<DialogContent className="overflow-hidden p-0 shadow-lg">
Expand Down

0 comments on commit 824a35a

Please sign in to comment.