@intility/bifrost-react
Version:
React library for Intility's design system, Bifrost.
30 lines (29 loc) • 1.32 kB
TypeScript
import type { PropsFor } from "../../types.js";
export type ButtonState = ButtonProps["state"];
export type ButtonVariant = ButtonProps["variant"];
export type ButtonProps = PropsFor<"button", {
/** Available variants: `'basic'` (default), `'filled'`, or `'flat'`
* @remark `'outline'` variant removed in 5.0 (deprecated since 4.7, the
* default `'basic'` variant is outlined) */
variant?: "basic" | "filled" | "flat";
/** Available states: `'default'`, `'inactive'`, `'alert'`, or `'inverted'`
*/
state?: "default" | "alert" | "inactive" | "neutral" | "inverted";
/** Change the button size to small */
small?: boolean;
/** Mark as selected when used inside `<Button.Group>` */
active?: boolean;
/** Apply rounded corners */
pill?: boolean;
/**
* The button type can be `'button'` (default), `'submit'` or `'reset'`
* @link
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type
* */
type?: "button" | "reset" | "submit";
/** Remove inline (left and right) padding, allows pill button with only an
* icon as content to be circular */
noPadding?: boolean;
}>;
declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
export default Button;