UNPKG

flowbite-angular

Version:

<div align="center"> <h1>:construction: flowbite-angular (unreleased) :construction:</h1> <p> <a href="https://flowbite.com"> <img alt="Flowbite - Tailwind CSS components" width="350" src="https://flowbite.s3.amazonaws.com/github/logo-github

37 lines (36 loc) 1.33 kB
import type { FlowbiteTheme } from 'flowbite-angular'; import type { OnInit } from '@angular/core'; import * as i0 from "@angular/core"; /** * Use to give a clean API on the current application theme */ export declare class FlowbiteThemeDirective implements OnInit { private readonly injector; private readonly localStorageKey; private readonly _currentTheme; ngOnInit(): void; /** * Get the application theme based on `signals` */ readonly currentTheme: import("@angular/core").Signal<FlowbiteTheme>; /** * Get theme from the `localStorage` * * @returns The current theme saved in the `localStorage` with the key `color-theme` */ getLocalStorageTheme(): FlowbiteTheme; /** * Toggle the theme saved in the `localStorage` and available in `currentTheme` * * @param theme If provided, force the theme instead of toggling it between light and dark mode */ toggleTheme(theme?: FlowbiteTheme): void; /** * Set the theme inside the page * * @param theme Theme to apply */ setTheme(theme: FlowbiteTheme): void; static ɵfac: i0.ɵɵFactoryDeclaration<FlowbiteThemeDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<FlowbiteThemeDirective, "[flowbiteTheme]", never, {}, {}, never, never, true, never>; }