irradiant-svelte
Version:
Easily build sleek, minimalistic web apps with this easy to use and powerful svelte component library.
50 lines (41 loc) • 961 B
TypeScript
/// <reference types="svelte" />
export interface AccordionProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
/**
* User defined classes
* @default ""
*/
className?: string;
/**
* Disables all default styling, allowing you to further customize this component
* @default false
*/
styled?: boolean;
/**
* The border and foreground color of the accordion
* @default "dark"
*/
theme?: "light" | "dark";
/**
* Have the accordion item default to open
* @default false
*/
isOpen?: boolean;
/**
* The clickable accordion icon when it's opened
* @default "▲"
*/
iconOpened?: string;
/**
* The clickabel accordion icon when it's closed
* @default "▼"
*/
iconClosed?: string;
}
export default class Accordion {
$$prop_def: AccordionProps;
$$slot_def: {
body: {};
heading: {};
};
$on(eventname: string, cb: (event: Event) => void): () => void;
}