UNPKG

@intility/bifrost-react

Version:

React library for Intility's design system, Bifrost.

25 lines (24 loc) 904 B
import { jsx as _jsx } from "react/jsx-runtime"; import { forwardRef } from "react"; import classnames from "classnames"; /** * Banner component * @deprecated since 5.0 - will be removed in next major. Maybe you're looking * for `<Message statusBar />` instead? */ const Banner = /*#__PURE__*/ forwardRef(({ className, align = "right", ...props }, ref)=>{ // eslint-disable-next-line no-prototype-builtins const isButton = props?.hasOwnProperty("onClick"); const El = isButton ? "button" : "div"; return /*#__PURE__*/ _jsx(El, { className: classnames("bf-banner", className, { "bf-banner-button": isButton, "bf-banner-left": align === "left" }), ...props, // eslint-disable-next-line @typescript-eslint/ban-ts-comment //@ts-ignore(2323) ref: ref }); }); Banner.displayName = "Banner"; export default Banner;