UNPKG

@metamask/snaps-sdk

Version:

A library containing the core functionality for building MetaMask Snaps

43 lines 1.59 kB
import type { ButtonElement } from "./form/Button.mjs"; import type { StandardFormattingElement } from "./formatting/index.mjs"; import type { IconElement } from "./Icon.mjs"; import type { LinkElement } from "./Link.mjs"; import type { SkeletonElement } from "./Skeleton.mjs"; import type { TextElement } from "./Text.mjs"; import { type SnapsChildren } from "../component.mjs"; /** * Types of children components that can be used with Banner. */ export type BannerChildren = SnapsChildren<TextElement | StandardFormattingElement | LinkElement | IconElement | ButtonElement | SkeletonElement>; /** * The props of the {@link Banner} component. * * @param children - The content to display in the banner. * @param title - Title of the banner. * @param severity - Severity level of the banner. */ export type BannerProps = { children: BannerChildren; title: string; severity: 'danger' | 'info' | 'success' | 'warning'; }; /** * A Banner component, which is used to display custom banner alerts. * * @param props - The props of the component. * @param props.children - The content to display in the banner. * @param props.title - Title of the banner. * @param props.severity - Severity level of the banner. * @example * <Banner title="Success banner" severity="success"> * <Text>Here is the banner content!</Text> * </Banner> */ export declare const Banner: import("../component.mjs").SnapComponent<BannerProps, "Banner">; /** * A Banner element. * * @see Banner */ export type BannerElement = ReturnType<typeof Banner>; //# sourceMappingURL=Banner.d.mts.map