📝(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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user