Refactor component props formatting for consistency in extends usage across UI and documentation files

This commit is contained in:
2026-01-01 13:19:36 +01:00
parent de8e18e97d
commit b9a746bc16
5 changed files with 6 additions and 9 deletions

View File

@@ -231,8 +231,7 @@ const componentVariants = cva(
);
interface MyComponentProps
extends React.HTMLAttributes<HTMLDivElement>,
VariantProps<typeof componentVariants> {
extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof componentVariants> {
// Additional props here
}

View File

@@ -244,8 +244,7 @@ const componentVariants = cva(
);
interface ComponentProps
extends React.HTMLAttributes<HTMLDivElement>,
VariantProps<typeof componentVariants> {}
extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof componentVariants> {}
export function Component({ variant, size, className, ...props }: ComponentProps) {
return <div className={cn(componentVariants({ variant, size, className }))} {...props} />;

View File

@@ -23,8 +23,7 @@ const badgeVariants = cva(
);
export interface BadgeProps
extends React.HTMLAttributes<HTMLDivElement>,
VariantProps<typeof badgeVariants> {}
extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}
function Badge({ className, variant, ...props }: BadgeProps) {
return <div className={cn(badgeVariants({ variant }), className)} {...props} />;

View File

@@ -32,8 +32,7 @@ const buttonVariants = cva(
);
export interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof buttonVariants> {
extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
asChild?: boolean;
}

View File

@@ -49,7 +49,8 @@ const sheetVariants = cva(
);
interface SheetContentProps
extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
extends
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
VariantProps<typeof sheetVariants> {}
const SheetContent = React.forwardRef<