pyro
Version:
Pyro custom elements
45 lines (44 loc) • 1.68 kB
TypeScript
import { LitElement } from 'lit';
/**
* Collapsible containers that can contain disclosure elements. They can be be single or grouped, where only one can be open at a time.
* [docs](https://pyrojs.com/el/accordion)
*
* ```html
* <pyro-accordion summary="Click me" open>
* <span slot="content">
* Lorem ipsum dolor sit amet consectetur, adipisicing elit.
* </span>
* </pyro-accordion>
* ```
*
* @tag pyro-accordion
*
* @slot summary - Summary of the accordion, always visible
* @slot content - Content of the accordion that can be opened
* @slot icon - Slot for the icon to be place inside the summary, chevron by default
*
* @cssprop [--pyro-accordion-text-color=var(--pyro-text-color)] - `color`
* @cssprop [--pyro-accordion-surface-color=var(--pyro-surface-color)] - `background`
* @cssprop [--pyro-accordion-border=var(--pyro-border)] - `border`
* @cssprop [--pyro-accordion-border-radius=var(--pyro-border-radius)] - `border-radius`
* @cssprop [--pyro-accordion-spacing=var(--pyro-spacing)] - `padding`
*
*/
export declare class PyroAccordion extends LitElement {
static styles: import('lit').CSSResult;
/** Summary of the accordion, overriden by `slot="summary"` */
summary: string;
/** Content of the accordion, overriden by `slot="content"` */
content: string;
/** Indicates whether the accordion is open */
open?: boolean | undefined;
/** Disables flipping of the icon when open/closed */
'no-flip'?: boolean | undefined;
private handleClick;
render(): import('lit-html').TemplateResult<1>;
}
declare global {
interface HTMLElementTagNameMap {
'pyro-accordion': PyroAccordion;
}
}