@adaptabletools/adaptable
Version:
Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
22 lines (21 loc) • 684 B
JavaScript
import { SHOW_THEME_EDITOR } from '../../View/Components/Popups/WindowPopups/windowFactory';
import { ApiBase } from '../Implementation/ApiBase';
export class ThemeInternalApi extends ApiBase {
isSystemTheme(themeName) {
return this.getThemeApi()
.getSystemThemes()
.some((theme) => theme.Name === themeName);
}
getThemeClassName(theme) {
return `ab--theme-${theme}`;
}
openInWindow() {
this.getAdaptableInternalApi().showPopupWindow({
id: SHOW_THEME_EDITOR,
title: 'Theme',
icon: 'theme',
factoryId: SHOW_THEME_EDITOR,
popupProps: {},
});
}
}