@octopusdeploy/design-system-components
Version:
The design systems component library.
31 lines (30 loc) • 1.15 kB
TypeScript
import type * as React from "react";
import type { ButtonBasicProps, ButtonLinkProps } from "../Button";
export declare const calloutTypes: readonly ["information", "success", "warning", "danger", "new-feature", "generic", "upsell"];
export type CalloutType = (typeof calloutTypes)[number];
export interface OptionalTitleProps {
title?: React.ReactNode;
hideTitle: true;
}
export interface RequiredTitleProps {
title: React.ReactNode;
hideTitle?: false;
}
type TitleProps = OptionalTitleProps | RequiredTitleProps;
type PrimaryActionProps = Pick<ButtonBasicProps, "label" | "onClick" | "disabled"> | Pick<ButtonLinkProps, "label" | "onClick" | "href" | "external" | "disabled">;
type SecondaryActionProps = Pick<ButtonLinkProps, "label" | "href">;
type CalloutProps = TitleProps & {
type: CalloutType;
actions?: {
primary: PrimaryActionProps;
secondary?: SecondaryActionProps;
};
canClose?: boolean;
onClose?: () => void;
children?: React.ReactNode;
};
export declare const Callout: {
(props: CalloutProps): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
export {};