ng-theme-system
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

NgThemeSystem

Overview

A simple Angular service which return the user system theme( use ng-theme-system)

Démo

Démo/doc

Installation

npm i ng-theme-system
import { NgThemeSystemService } from "ng-theme-system";

imports: [NgThemeSystemService];

Usage

    import { NgThemeSystemService } from 'ng-theme-system';

   constructor(private themeSystemService: NgThemeSystemService) {
    console.log('isDarkTheme', this.themeSystemService.isDarkTheme());
    console.log('isLightTheme', this.themeSystemService.isLightTheme());
    console.log('currentTheem', this.themeSystemService.getSytemTheme());
    this.themeSystemService.listenSystemTheme().subscribe((theme) => {
      console.log('themeChangeListener', theme);
    });
  }

Package Sidebar

Install

npm i ng-theme-system

Weekly Downloads

1

Version

0.0.3

License

none

Unpacked Size

23.2 kB

Total Files

14

Last publish

Collaborators

  • paulrichez