UNPKG

@intility/bifrost-react

Version:

React library for Intility's design system, Bifrost.

27 lines (26 loc) 938 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { forwardRef } from "react"; import classnames from "classnames"; import ExpandIcon from "../internal/ExpandIcon/ExpandIcon.internal.js"; /** * Button with a rotatable angle icon */ const ButtonExpand = /*#__PURE__*/ forwardRef(({ children, className, open, iconProps, ...props }, ref)=>{ return /*#__PURE__*/ _jsxs("button", { type: "button", ...props, ref: ref, className: classnames("bf-button-expand bf-neutral-link", className), children: [ /*#__PURE__*/ _jsx(ExpandIcon, { open: open, iconProps: iconProps }), children && /*#__PURE__*/ _jsx("span", { className: "bf-neutral-link-text", children: children }) ] }); }); ButtonExpand.displayName = "Button.Expand"; export default ButtonExpand;