refactor: improve type safety and code style
Some checks failed
CI / build-and-test (push) Failing after 24m31s
Some checks failed
CI / build-and-test (push) Failing after 24m31s
This commit is contained in:
@@ -8,7 +8,6 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
||||
variant?: ButtonVariant;
|
||||
size?: ButtonSize;
|
||||
icon?: LucideIcon;
|
||||
iconPosition?: 'left' | 'right';
|
||||
isLoading?: boolean;
|
||||
}
|
||||
|
||||
@@ -33,7 +32,6 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
|
||||
variant = 'primary',
|
||||
size = 'md',
|
||||
icon: Icon,
|
||||
iconPosition = 'left',
|
||||
isLoading = false,
|
||||
disabled,
|
||||
children,
|
||||
|
||||
@@ -34,7 +34,7 @@ export const Card = forwardRef<HTMLDivElement, CardProps>(
|
||||
|
||||
Card.displayName = 'Card';
|
||||
|
||||
interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {}
|
||||
type CardHeaderProps = HTMLAttributes<HTMLDivElement>;
|
||||
|
||||
export const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(
|
||||
({ className = '', children, ...props }, ref) => {
|
||||
@@ -52,7 +52,7 @@ export const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(
|
||||
|
||||
CardHeader.displayName = 'CardHeader';
|
||||
|
||||
interface CardBodyProps extends HTMLAttributes<HTMLDivElement> {}
|
||||
type CardBodyProps = HTMLAttributes<HTMLDivElement>;
|
||||
|
||||
export const CardBody = forwardRef<HTMLDivElement, CardBodyProps>(
|
||||
({ className = '', children, ...props }, ref) => {
|
||||
@@ -66,7 +66,7 @@ export const CardBody = forwardRef<HTMLDivElement, CardBodyProps>(
|
||||
|
||||
CardBody.displayName = 'CardBody';
|
||||
|
||||
interface CardFooterProps extends HTMLAttributes<HTMLDivElement> {}
|
||||
type CardFooterProps = HTMLAttributes<HTMLDivElement>;
|
||||
|
||||
export const CardFooter = forwardRef<HTMLDivElement, CardFooterProps>(
|
||||
({ className = '', children, ...props }, ref) => {
|
||||
|
||||
Reference in New Issue
Block a user