import { ExclamationIcon } from "@heroicons/react/outline"; import { XIcon } from "@heroicons/react/solid"; import classNames from "classnames"; import noop from "lodash/noop"; import { ReactNode } from "react"; import { Icon } from "@calcom/ui"; export type TopBannerProps = { text: string; variant?: keyof typeof variantClassName; actions?: ReactNode; onClose?: () => void; }; const variantClassName = { default: "bg-gradient-primary", warning: "bg-orange-400", error: "bg-red-400", }; export function TopBanner(props: TopBannerProps) { const { variant = "default", text, actions, onClose } = props; return (
{variant === "error" && (
{actions && )} {variant === "warning" && ( )} {text}