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