UNPKG

@intility/bifrost-react

Version:

React library for Intility's design system, Bifrost.

28 lines (27 loc) 1.09 kB
import { jsx as _jsx } from "react/jsx-runtime"; import { forwardRef } from "react"; import classnames from "classnames"; /** * Clickable button */ const Button = /*#__PURE__*/ forwardRef(({ children, variant = "basic", state = "default", className, small = false, active = false, pill = false, noPadding = false, type = "button", ...props }, ref)=>{ return /*#__PURE__*/ _jsx("button", { ...props, className: classnames(className, "bf-button", { "bf-button-small": small, "bf-button-filled": variant === "filled", "bf-button-flat": variant === "flat", "bf-button-inverted": state === "inverted", "bf-button-inactive": state === "inactive", "bf-button-alert": state === "alert", "bf-button-neutral": state === "neutral", "bf-button-selected": active, "bf-button-pill": pill, "bf-button-nopadding": noPadding }), ref: ref, type: type, children: children }); }); Button.displayName = "Button"; export default Button;