UNPKG

@oslokommune/punkt-elements

Version:

Komponentbiblioteket til Punkt, et designsystem laget av Oslo Origo

22 lines (21 loc) 791 B
import { PktElement } from './element'; /** * Base class for Punkt light DOM elements that use the slotContent directive. * Extends PktElement with slot content collection and distribution. * * Use this instead of PktElement when the component's template uses slotContent(). * @extends PktElement */ export declare class PktElementWithSlot<T = {}> extends PktElement<T> { /** * Pre-collect children before Lit's first render clears them. * This ensures slotContent() has access to the original children. */ connectedCallback(): void; /** * Checks if a slot has content distributed to it via the slotContent directive. * * @param slotName - Name of the slot. Omit for the default slot. */ hasSlotContent(slotName?: string): boolean; }