UNPKG

@alihbuzaid/ember-ui

Version:

Fleetbase UI provides all the interface components, helpers, services and utilities for building a Fleetbase extension into the Console.

17 lines (14 loc) 414 B
import Helper from '@ember/component/helper'; import { getOwner } from '@ember/application'; export default class IsDarkModeHelper extends Helper { compute() { const owner = getOwner(this); if (owner) { const theme = owner.lookup('service:theme'); if (theme) { return theme.activeTheme === 'dark'; } } return false; } }