pyro
Version:
Pyro custom elements
45 lines (44 loc) • 1.27 kB
TypeScript
import { Severity } from '../types';
import { DefineComponent } from 'vue';
import { HTMLAttributes } from 'svelte/elements';
export interface AlertProps {
/** Alert severity, determines colors */
severity?: Severity;
/** Adds a bright colored band to the alert left, similar to a border */
band?: boolean;
/** Adds an cross icon to dismiss the alert */
dismissible?: boolean;
/** (static) Added if the alert was dismissed */
dismissed?: boolean;
/** Contents of the alert */
children?: any;
}
declare module 'vue' {
interface GlobalComponents {
'pyro-alert': DefineComponent<AlertProps>;
}
}
interface PyroAlertPreact extends Omit<JSX.HTMLAttributes, keyof AlertProps>, AlertProps {
}
declare module 'preact/jsx-runtime' {
namespace JSX {
interface IntrinsicElements {
'pyro-alert': PyroAlertPreact;
}
}
}
interface PyroAlertSvelte extends Omit<HTMLAttributes<any>, keyof AlertProps>, AlertProps {
}
declare module 'svelte/elements' {
interface SvelteHTMLElements {
'pyro-alert': PyroAlertSvelte;
}
}
declare module 'solid-js' {
namespace JSX {
interface IntrinsicElements {
'pyro-alert': PyroAlertPreact;
}
}
}
export {};