UNPKG

@forest-js/core

Version:

A tiny, functional DOM engine with explicit update and real DOM.

20 lines 805 B
import { StoreMap, Utility, UtilityProps } from "../types"; /** * @function addStyle * @description Applies CSS styles to an element. * Supports reactive styles when using stores. * * @template R - Style properties to apply. * @template S - StoreMap type when used reactively. * @template E - Element type (defaults to HTMLElement). * @param args - Style properties or store and mapper function * @returns Utility function for adding styles * @example * ```ts * const setColor = addStyle<HTMLDivElement, { color: string }>( * { color: "red" } * )(MyElement); * ``` */ export declare const addStyle: <R extends Partial<CSSStyleDeclaration>, S extends StoreMap = StoreMap, E extends HTMLElement = HTMLElement>(...args: UtilityProps<R, S>) => Utility<E>; //# sourceMappingURL=style.d.ts.map