UNPKG

@adaptabletools/adaptable

Version:

Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

15 lines (14 loc) 469 B
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}`; } getDOMPreferredColorScheme() { return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; } }