📝(react) make color prop of Button appear in the doc

This prop color was not appearing in the ArgTypes because it was an override
attribute.

Fixes #235
This commit is contained in:
Nathan Vasse
2024-02-28 14:34:05 +01:00
committed by NathanVss
parent ce7a3d7c5b
commit c5e5d9fa85

View File

@@ -6,21 +6,23 @@ import React, {
ReactNode,
} from "react";
export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> &
AnchorHTMLAttributes<HTMLAnchorElement> & {
color?:
| "primary"
| "primary-text"
| "secondary"
| "tertiary"
| "tertiary-text"
| "danger";
size?: "medium" | "small" | "nano";
icon?: ReactNode;
iconPosition?: "left" | "right";
active?: boolean;
fullWidth?: boolean;
};
type DomProps = ButtonHTMLAttributes<HTMLButtonElement> &
AnchorHTMLAttributes<HTMLAnchorElement>;
export type ButtonProps = Omit<DomProps, "color"> & {
size?: "medium" | "small" | "nano";
color?:
| "primary"
| "primary-text"
| "secondary"
| "tertiary"
| "tertiary-text"
| "danger";
icon?: ReactNode;
iconPosition?: "left" | "right";
active?: boolean;
fullWidth?: boolean;
};
export type ButtonElement = HTMLButtonElement & HTMLAnchorElement;