UNPKG

igniteui-webcomponents

Version:

Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.

25 lines 902 B
import { createThemeController } from './theming-controller.js'; export function themes(themes, options) { return (proto) => { proto.addInitializer((instance) => { const controller = createThemeController(instance, themes); if (options?.exposeController) { Object.defineProperty(instance, themeSymbol, { get() { return controller; }, configurable: true, enumerable: false, }); } }); }; } export function getThemeController(host) { return isControllerExposed(host) ? host[themeSymbol] : undefined; } function isControllerExposed(host) { return Object.getOwnPropertySymbols(host).includes(themeSymbol); } const themeSymbol = Symbol('Theming Controller'); //# sourceMappingURL=theming-decorator.js.map