Update prop expansion on components
This commit is contained in:
@@ -19,7 +19,6 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
data-testid="mattrixwv-button"
|
||||
ref={ref}
|
||||
type={type}
|
||||
{...buttonProps}
|
||||
disabled={disabled}
|
||||
className={clsx(
|
||||
className,
|
||||
@@ -57,6 +56,7 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
"cursor-not-allowed opacity-75": disabled
|
||||
}
|
||||
)}
|
||||
{...buttonProps}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -14,7 +14,6 @@ const DangerButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
return (
|
||||
<Button
|
||||
data-testid="mattrixwv-danger-button"
|
||||
{...buttonProps}
|
||||
ref={ref}
|
||||
variant={variant}
|
||||
disabled={disabled}
|
||||
@@ -42,6 +41,7 @@ const DangerButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
"text-danger hover:text-white active:text-white": (variant === "ghost" || variant === "outline-ghost") && (!disabled)
|
||||
}
|
||||
)}
|
||||
{...buttonProps}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -13,7 +13,6 @@ const DarkButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
return (
|
||||
<Button
|
||||
data-testid="mattrixwv-dark-button"
|
||||
{...buttonProps}
|
||||
ref={ref}
|
||||
variant={variant}
|
||||
disabled={disabled}
|
||||
@@ -41,6 +40,7 @@ const DarkButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
"text-dark hover:text-white active:text-white": (variant === "ghost" || variant === "outline-ghost") && (!disabled)
|
||||
}
|
||||
)}
|
||||
{...buttonProps}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -13,7 +13,6 @@ const InfoButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
return (
|
||||
<Button
|
||||
data-testid="mattrixwv-info-button"
|
||||
{...buttonProps}
|
||||
variant={variant}
|
||||
disabled={disabled}
|
||||
ref={ref}
|
||||
@@ -41,6 +40,7 @@ const InfoButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
"text-info hover:text-black active:text-black": (variant === "ghost" || variant === "outline-ghost") && (!disabled)
|
||||
}
|
||||
)}
|
||||
{...buttonProps}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -13,7 +13,6 @@ const LightButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
return (
|
||||
<Button
|
||||
data-testid="mattrixwv-light-button"
|
||||
{...buttonProps}
|
||||
ref={ref}
|
||||
variant={variant}
|
||||
disabled={disabled}
|
||||
@@ -41,6 +40,7 @@ const LightButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
"text-light hover:text-black active:text-black": (variant === "ghost" || variant === "outline-ghost") && (!disabled)
|
||||
}
|
||||
)}
|
||||
{...buttonProps}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -13,7 +13,6 @@ const MoltenButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
return (
|
||||
<Button
|
||||
data-testid="mattrixwv-molten-button"
|
||||
{...buttonProps}
|
||||
ref={ref}
|
||||
variant={variant}
|
||||
disabled={disabled}
|
||||
@@ -41,6 +40,7 @@ const MoltenButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
"text-molten hover:text-black active:text-black": (variant === "ghost" || variant === "outline-ghost") && (!disabled)
|
||||
}
|
||||
)}
|
||||
{...buttonProps}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -13,7 +13,6 @@ const PrimaryButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
return (
|
||||
<Button
|
||||
data-testid="mattrixwv-primary-button"
|
||||
{...buttonProps}
|
||||
ref={ref}
|
||||
variant={variant}
|
||||
disabled={disabled}
|
||||
@@ -41,6 +40,7 @@ const PrimaryButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
"text-primary hover:text-white active:text-white": (variant === "ghost" || variant === "outline-ghost") && (!disabled)
|
||||
}
|
||||
)}
|
||||
{...buttonProps}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -13,7 +13,6 @@ const SecondaryButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
return (
|
||||
<Button
|
||||
data-testid="mattrixwv-secondary-button"
|
||||
{...buttonProps}
|
||||
ref={ref}
|
||||
variant={variant}
|
||||
disabled={disabled}
|
||||
@@ -41,6 +40,7 @@ const SecondaryButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
"text-secondary hover:text-white active:text-white": (variant === "ghost" || variant === "outline-ghost") && (!disabled)
|
||||
}
|
||||
)}
|
||||
{...buttonProps}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -13,7 +13,6 @@ const SuccessButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
return (
|
||||
<Button
|
||||
data-testid="mattrixwv-success-button"
|
||||
{...buttonProps}
|
||||
ref={ref}
|
||||
variant={variant}
|
||||
disabled={disabled}
|
||||
@@ -41,6 +40,7 @@ const SuccessButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
"text-success hover:text-black active:text-black": (variant === "ghost" || variant === "outline-ghost") && (!disabled)
|
||||
}
|
||||
)}
|
||||
{...buttonProps}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -13,7 +13,6 @@ const TertiaryButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
return (
|
||||
<Button
|
||||
data-testid="mattrixwv-tertiary-button"
|
||||
{...buttonProps}
|
||||
ref={ref}
|
||||
variant={variant}
|
||||
disabled={disabled}
|
||||
@@ -41,6 +40,7 @@ const TertiaryButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
"text-tertiary hover:text-white active:text-white": (variant === "ghost" || variant === "outline-ghost") && (!disabled)
|
||||
}
|
||||
)}
|
||||
{...buttonProps}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -13,7 +13,6 @@ const WarningButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
return (
|
||||
<Button
|
||||
data-testid="mattrixwv-warning-button"
|
||||
{...buttonProps}
|
||||
ref={ref}
|
||||
variant={variant}
|
||||
disabled={disabled}
|
||||
@@ -41,6 +40,7 @@ const WarningButton = forwardRef<HTMLButtonElement, ButtonProps>(({
|
||||
"text-warning hover:text-black active:text-black": (variant === "ghost" || variant === "outline-ghost") && (!disabled)
|
||||
}
|
||||
)}
|
||||
{...buttonProps}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -19,8 +19,8 @@ const DangerCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
|
||||
}
|
||||
)}
|
||||
showBox={showBox}
|
||||
{...props}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -19,8 +19,8 @@ const DarkCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
|
||||
}
|
||||
)}
|
||||
showBox={showBox}
|
||||
{...props}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -19,8 +19,8 @@ const InfoCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
|
||||
}
|
||||
)}
|
||||
showBox={showBox}
|
||||
{...props}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -19,8 +19,8 @@ const LightCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
|
||||
}
|
||||
)}
|
||||
showBox={showBox}
|
||||
{...props}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -19,8 +19,8 @@ const MoltenCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
|
||||
}
|
||||
)}
|
||||
showBox={showBox}
|
||||
{...props}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -19,8 +19,8 @@ const PrimaryCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
|
||||
}
|
||||
)}
|
||||
showBox={showBox}
|
||||
{...props}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -19,8 +19,8 @@ const SecondaryCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
|
||||
}
|
||||
)}
|
||||
showBox={showBox}
|
||||
{...props}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -19,8 +19,8 @@ const SuccessCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
|
||||
}
|
||||
)}
|
||||
showBox={showBox}
|
||||
{...props}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -19,8 +19,8 @@ const TertiaryCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
|
||||
}
|
||||
)}
|
||||
showBox={showBox}
|
||||
{...props}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -19,8 +19,8 @@ const WarningCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
|
||||
}
|
||||
)}
|
||||
showBox={showBox}
|
||||
{...props}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -14,8 +14,8 @@ const DarkRadioButton = forwardRef<HTMLInputElement, RadioButtonProps>(({
|
||||
"group-data-checked:bg-dark",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -12,7 +12,6 @@ const DangerSwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
}, ref ) => {
|
||||
return (
|
||||
<MattrixwvSwitch
|
||||
{...props}
|
||||
className={clsx(
|
||||
"bg-neutral-mid",
|
||||
className,
|
||||
@@ -30,6 +29,7 @@ const DangerSwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
)}
|
||||
disabled={disabled}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -12,7 +12,6 @@ const DarkSwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
}, ref ) => {
|
||||
return (
|
||||
<MattrixwvSwitch
|
||||
{...props}
|
||||
className={clsx(
|
||||
"bg-neutral-mid",
|
||||
className,
|
||||
@@ -30,6 +29,7 @@ const DarkSwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
)}
|
||||
disabled={disabled}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -12,7 +12,6 @@ const InfoSwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
}, ref ) => {
|
||||
return (
|
||||
<MattrixwvSwitch
|
||||
{...props}
|
||||
className={clsx(
|
||||
"bg-gray-400",
|
||||
className,
|
||||
@@ -30,6 +29,7 @@ const InfoSwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
)}
|
||||
disabled={disabled}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -12,7 +12,6 @@ const LightSwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
}, ref ) => {
|
||||
return (
|
||||
<MattrixwvSwitch
|
||||
{...props}
|
||||
className={clsx(
|
||||
"bg-neutral-mid",
|
||||
className,
|
||||
@@ -30,6 +29,7 @@ const LightSwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
)}
|
||||
disabled={disabled}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -12,7 +12,6 @@ const MoltenSwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
}, ref ) => {
|
||||
return (
|
||||
<MattrixwvSwitch
|
||||
{...props}
|
||||
className={clsx(
|
||||
"bg-neutral-mid",
|
||||
className,
|
||||
@@ -30,6 +29,7 @@ const MoltenSwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
)}
|
||||
disabled={disabled}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -12,7 +12,6 @@ const PrimarySwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
}, ref ) => {
|
||||
return (
|
||||
<MattrixwvSwitch
|
||||
{...props}
|
||||
className={clsx(
|
||||
"bg-neutral-mid",
|
||||
className,
|
||||
@@ -30,6 +29,7 @@ const PrimarySwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
)}
|
||||
disabled={disabled}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -12,7 +12,6 @@ const SecondarySwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
}, ref ) => {
|
||||
return (
|
||||
<MattrixwvSwitch
|
||||
{...props}
|
||||
className={clsx(
|
||||
"bg-neutral-mid",
|
||||
className,
|
||||
@@ -30,6 +29,7 @@ const SecondarySwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
)}
|
||||
disabled={disabled}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -12,7 +12,6 @@ const SuccessDangerSwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(
|
||||
}, ref ) => {
|
||||
return (
|
||||
<MattrixwvSwitch
|
||||
{...props}
|
||||
className={clsx(
|
||||
className,
|
||||
{
|
||||
@@ -29,6 +28,7 @@ const SuccessDangerSwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(
|
||||
)}
|
||||
disabled={disabled}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -12,7 +12,6 @@ const SuccessSwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
}, ref ) => {
|
||||
return (
|
||||
<MattrixwvSwitch
|
||||
{...props}
|
||||
className={clsx(
|
||||
"bg-neutral-mid",
|
||||
className,
|
||||
@@ -30,6 +29,7 @@ const SuccessSwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
)}
|
||||
disabled={disabled}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -12,7 +12,6 @@ const TertiarySwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
}, ref ) => {
|
||||
return (
|
||||
<MattrixwvSwitch
|
||||
{...props}
|
||||
className={clsx(
|
||||
"bg-gray-400",
|
||||
className,
|
||||
@@ -30,6 +29,7 @@ const TertiarySwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
)}
|
||||
disabled={disabled}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -12,7 +12,6 @@ const WarningSwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
}, ref ) => {
|
||||
return (
|
||||
<MattrixwvSwitch
|
||||
{...props}
|
||||
className={clsx(
|
||||
"bg-neutral-mid",
|
||||
className,
|
||||
@@ -30,6 +29,7 @@ const WarningSwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
|
||||
)}
|
||||
disabled={disabled}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -11,12 +11,12 @@ const TertiaryMessageBlock = forwardRef<HTMLDivElement, MessageBlockProps>(({
|
||||
return (
|
||||
<MessageBlock
|
||||
data-testid="mattrixwv-tertiary-message-block"
|
||||
{...messageProps}
|
||||
className={clsx(
|
||||
className,
|
||||
"bg-tertiary-xlight text-tertiary-mid"
|
||||
)}
|
||||
ref={ref}
|
||||
{...messageProps}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user