import type { BannerBasePropsShared } from "@metamask/design-system-shared"; import type { MouseEventHandler } from "react"; import type { BoxProps } from "../Box/index.mjs"; import type { ButtonProps } from "../Button/index.mjs"; import type { ButtonIconProps } from "../ButtonIcon/index.mjs"; import type { TextProps } from "../Text/index.mjs"; type BannerBaseActionButtonProps = Omit, 'children' | 'onClick' | 'variant'>; type BannerBaseCloseButtonProps = Omit, 'iconName' | 'onClick'> & { /** * Optional test id for the close button element. */ 'data-testid'?: string; }; type BannerBasePropsBase = BannerBasePropsShared & Omit & { /** * Optional props for the title `Text` when the title is a string. */ titleProps?: Partial; /** * Optional props for the description `Text` when description is a string. */ descriptionProps?: Partial; /** * Optional props for the children wrapper `Text` when children is a string. */ childrenWrapperProps?: Partial; /** * Optional click handler for the close button. * If provided, a close button is shown. */ onClose?: MouseEventHandler; /** * Optional props for the close `ButtonIcon`. * Only used when `onClose` is provided. */ closeButtonProps?: BannerBaseCloseButtonProps; }; type BannerBaseActionPropsWithHandler = { actionButtonOnClick: MouseEventHandler; actionButtonLabel: string; actionButtonProps?: BannerBaseActionButtonProps; }; type BannerBaseActionPropsWithoutHandler = { actionButtonOnClick?: undefined; actionButtonLabel?: string; actionButtonProps?: BannerBaseActionButtonProps; }; export type BannerBaseProps = BannerBasePropsBase & (BannerBaseActionPropsWithHandler | BannerBaseActionPropsWithoutHandler); export {}; //# sourceMappingURL=BannerBase.types.d.mts.map