@revolist/revogrid
Version:
Virtual reactive data grid spreadsheet component - RevoGrid.
19 lines (18 loc) • 515 B
JavaScript
/*!
* Built by Revolist OU ❤️
*/
import { setMode } from "@stencil/core";
import { getTheme } from "../themeManager/theme.service";
export default function () {
setMode(elm => {
let theme = elm.theme || elm.getAttribute('theme');
if (typeof theme === 'string') {
theme = theme.trim();
}
const parsedTheme = getTheme(theme);
if (parsedTheme !== theme) {
elm.setAttribute('theme', parsedTheme);
}
return parsedTheme;
});
}