UNPKG

@studiometa/js-toolkit

Version:

A set of useful little bits of JavaScript to boost your project! 🚀

35 lines (34 loc) • 1.25 kB
import { OptionsManager } from './OptionsManager.js'; import type { OptionObject } from './OptionsManager.js'; export type ResponsiveOptionObject = OptionObject & { responsive?: boolean; }; /** * Class options to manage options as data attributes on an HTML element. */ export declare class ResponsiveOptionsManager<T> extends OptionsManager<T> { /** * Get an option value. * * @param {string} name The option name. * @param {ResponsiveOptionObject} config The option configuration. * @return {any} */ get(name: string, config: ResponsiveOptionObject): any; /** * Set an option value. * * @param {string} name The option name. * @param {any} value The new value. * @param {ResponsiveOptionObject} config The option configuration. */ set(name: string, value: unknown, config: ResponsiveOptionObject): void; /** * Get the currently active responsive name of an option. * * @param {ResponsiveOptionsManager} that * @param {string} name The default name of the option. * @return {string} The responsive name if one matches the current breakpoint, the default name otherwise. */ __getResponsiveName(name: string): string; }