UNPKG

@octopusdeploy/design-system-components

Version:
40 lines (39 loc) 1.67 kB
import type { DesignSystemLinkHref } from "../../routing"; export declare const inlineMessageTypes: readonly ["information", "warning", "danger", "feature", "upsell"]; export type InlineMessageType = (typeof inlineMessageTypes)[number]; interface ActionButtonProps { /** The text label displayed on the action button */ label: string; /** Optional click handler for the action button */ onClick?: () => void; } interface ActionLinkPropsBase { /** The text label displayed on the action button */ label: string; /** The href of the action link */ href: DesignSystemLinkHref; /** Internal links only: when false, the link opens in a new tab (with a new-tab icon). Defaults to true (same tab). External links always open in a new tab. */ openInSelf?: boolean; } interface ActionLinkPropsExternal extends ActionLinkPropsBase { /** Optional prop to determine if the link is external */ external: true; /** Optional prop to track analytics for the action link if its an external link */ trackAnalytics?: boolean; } type ActionLinkProps = ActionLinkPropsBase | ActionLinkPropsExternal; export interface InlineMessageProps { /** Available types for inline messages used for styling and icons*/ type: InlineMessageType; /** Optional bolded title text */ title?: string; /** The main message content */ description: string; /** Optional action button */ action?: ActionButtonProps | ActionLinkProps; } export declare function InlineMessage(props: InlineMessageProps): import("react/jsx-runtime").JSX.Element; export declare namespace InlineMessage { var displayName: string; } export {};