@loadsmart/miranda-wc
Version:
Miranda Web Components component library
59 lines (58 loc) • 1.75 kB
TypeScript
import { nothing } from 'lit';
import type { PropertyValues } from 'lit';
import { Component } from '../component';
import type { BannerActionPrimary } from './banner-action-primary';
import '../button';
import '../close-button';
import '../text';
import '../icon';
export type BannerVariant = 'neutral' | 'warning' | 'danger' | 'success' | 'marketing';
export interface BannerProps {
variant?: BannerVariant;
dismissible?: boolean;
dismissed?: boolean;
ondismiss?: (event: CustomEvent) => void;
}
export declare class Banner extends Component implements BannerProps {
#private;
static styles: import("lit").CSSResult[];
static get properties(): {
variant: {
type: StringConstructor;
};
dismissible: {
type: BooleanConstructor;
};
dismissed: {
type: BooleanConstructor;
reflect: boolean;
};
};
/**
* Determines the style. Defaults to 'neutral'.
*/
variant: BannerProps['variant'];
/**
* Determine if the banner is dismissible. It will not be dismissible if
* there's an action defined. Defaults to false.
*/
dismissible: BannerProps['dismissible'];
/**
* Determine if the banner was dismissed or not.
*/
dismissed: BannerProps['dismissed'];
/**
* Event handler for dismissing the banner.
*/
ondismiss: BannerProps['ondismiss'];
static define(): void;
constructor();
get primaryAction(): BannerActionPrimary | null;
updated(changedProperties: PropertyValues): void;
render(): import("lit-html").TemplateResult<1> | typeof nothing;
}
declare global {
interface HTMLElementTagNameMap {
'm-banner': Banner;
}
}