import React from "react"; interface Action { /** * The label of the action. */ label: string; /** * The function to execute when the action is triggered. */ onTrigger: () => Promise | void; } export interface PrimaryAction extends Action { /** * The variant of the action. */ variant: "primary"; } export interface SecondaryAction extends Action { /** * The variant of the action. */ variant: "secondary"; } interface SmallBannerProps { /** * The size of the banner. * * @default "small" */ size?: "small"; /** * The title of the banner. * * Only for large banners. */ title?: never; } interface LargeBannerProps { /** * The size of the banner. * * @default "small" */ size: "large"; /** * The title of the banner. * * Only for large banners. */ title: string; } type BannerSizeProps = SmallBannerProps | LargeBannerProps; type BannerProps = BannerSizeProps & { /** * The variant of the banner. */ variant: "neutral" | "warning" | "error"; /** * The text of the banner. * * Only text is supported. */ children: React.ReactNode; /** * The actions of the banner. */ actions?: [PrimaryAction] | [SecondaryAction] | [SecondaryAction, PrimaryAction]; }; /** * A component for displaying a banner of information with up to two actions. * * * @example * ```tsx * // my-dialog.tsx * import type { Banner } from "attio/client"; * * export function MyDialog() { * return ( * <> * * Some important information with no actions * * {}}]} * > * Some important information with one primary action * * {}}]} * > * Some important information with one secondary action * * {}}, * {label: "Primary Action", type: "primary", onTrigger: () => {}}, * ]} * > * Some important information with two actions * * * ) * } * ``` */ export declare const Banner: (props: BannerProps) => React.JSX.Element; export {}; //# sourceMappingURL=banner.d.ts.map