📝(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, ReactNode,
} from "react"; } from "react";
export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & type DomProps = ButtonHTMLAttributes<HTMLButtonElement> &
AnchorHTMLAttributes<HTMLAnchorElement> & { AnchorHTMLAttributes<HTMLAnchorElement>;
color?:
| "primary" export type ButtonProps = Omit<DomProps, "color"> & {
| "primary-text" size?: "medium" | "small" | "nano";
| "secondary" color?:
| "tertiary" | "primary"
| "tertiary-text" | "primary-text"
| "danger"; | "secondary"
size?: "medium" | "small" | "nano"; | "tertiary"
icon?: ReactNode; | "tertiary-text"
iconPosition?: "left" | "right"; | "danger";
active?: boolean; icon?: ReactNode;
fullWidth?: boolean; iconPosition?: "left" | "right";
}; active?: boolean;
fullWidth?: boolean;
};
export type ButtonElement = HTMLButtonElement & HTMLAnchorElement; export type ButtonElement = HTMLButtonElement & HTMLAnchorElement;