UNPKG

@octopusdeploy/design-system-components

Version:
58 lines (57 loc) 2.15 kB
import type React from "react"; import type { PrimaryPageAction, PageAction } from "../../PageActions/PageActions"; type ExcludePageActionType<T extends { type: unknown; }, TAction = PageAction> = TAction extends T ? Exclude<TAction, T> : TAction; export type InlineEmptyStateOnboardingPrimaryPageAction = ExcludePageActionType<{ type: "custom"; }, PrimaryPageAction>; export type InlineEmptyStateOnboardingSecondaryPageAction = ExcludePageActionType<{ type: "custom"; }, PageAction> & { buttonType: "secondary"; }; export interface InlineEmptyStateExternalOnboardingPageAction { label: string; accessibleName?: string; disabled?: boolean; onClick: (event: React.MouseEvent | undefined) => Promise<unknown> | void; } export type LearnMoreActionType = { label: string; onClick?: () => void; path: string; }; type InlineOnboardingIllustrationType = "NoEntities" | "EmptyState" | "Custom"; type BaseProps = { illustration: InlineOnboardingIllustrationType; learnMore?: LearnMoreActionType; actions?: ActionProps; }; type PredefinedIllustrationProps = BaseProps & { illustration: "NoEntities" | "EmptyState"; }; type CustomIllustrationProps = BaseProps & { illustration: "Custom"; image: React.ReactElement; }; type IllustrationProps = PredefinedIllustrationProps | CustomIllustrationProps; type CustomTitleAndDescriptionProps = { title: string; description: string; }; type StandardTitleAndDescriptionProps = { entityName: string; }; type TitleAndDescriptionProps = CustomTitleAndDescriptionProps | StandardTitleAndDescriptionProps; type PrimaryAndSecondaryActionProps = { primary: InlineEmptyStateOnboardingPrimaryPageAction; secondary?: InlineEmptyStateOnboardingSecondaryPageAction; }; type ExternalActionProps = { external: InlineEmptyStateExternalOnboardingPageAction; }; type ActionProps = PrimaryAndSecondaryActionProps | ExternalActionProps; export type InlineEmptyStateOnboardingProps = IllustrationProps & TitleAndDescriptionProps; export declare function InlineEmptyStateOnboarding(props: InlineEmptyStateOnboardingProps): JSX.Element; export {};