@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
25 lines (24 loc) • 1.28 kB
TypeScript
import type { Generic } from 'adopted-style-sheets';
import type { HeadingLevel, PropAlert, PropHasCloser, PropLabel } from '../props';
import type { EventCallback } from '../types';
export declare const alertTypeOptions: readonly ["default", "info", "success", "warning", "error"];
export type AlertType = (typeof alertTypeOptions)[number];
export declare const alertVariantOptions: readonly ["card", "msg"];
export type AlertVariant = (typeof alertVariantOptions)[number];
export type KoliBriAlertEventCallbacks = {
onClose?: EventCallback<Event>;
};
type RequiredAlertProps = NonNullable<unknown>;
type OptionalAlertProps = {
level: HeadingLevel;
on: KoliBriAlertEventCallbacks;
type: AlertType;
variant: AlertVariant;
} & PropLabel & PropAlert & PropHasCloser;
type RequiredAlertStates = RequiredAlertProps;
type OptionalAlertStates = OptionalAlertProps;
export type InternalAlertProps = RequiredAlertProps & OptionalAlertProps;
export type AlertProps = Generic.Element.Members<RequiredAlertProps, OptionalAlertProps>;
export type AlertStates = Generic.Element.Members<RequiredAlertStates, OptionalAlertStates>;
export type AlertAPI = Generic.Element.ComponentApi<RequiredAlertProps, OptionalAlertProps, RequiredAlertStates, OptionalAlertStates>;
export {};