# pip-webui2-themes-temp

> ![](https://img.shields.io/badge/license-MIT-blue.svg)

Latest version **1.0.0-beta.3** (published 2018-10-05) · 0 weekly downloads

## Install

```sh
npm install pip-webui2-themes-temp
pnpm add pip-webui2-themes-temp
yarn add pip-webui2-themes-temp
bun add pip-webui2-themes-temp
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-beta.3 |
| Published | 2018-10-05 |
| First published | 2018-10-01 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 181 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | iworb |

## Links

- npm: https://www.npmjs.com/package/pip-webui2-themes-temp
- Repository: https://github.com/pip-webui2/pip-webui2-themes
- Homepage: https://github.com/pip-webui2/pip-webui2-themes#readme
- Issues: https://github.com/pip-webui2/pip-webui2-themes/issues
- npm.io page: https://npm.io/package/pip-webui2-themes-temp

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.9.0

## Recent versions

- 1.0.0-beta.3 (latest) — 2018-10-05
- 1.0.0-beta.2 — 2018-10-03
- 1.0.0-beta.1 — 2018-10-03
- 0.0.2 — 2018-10-01

## README

# <img src="https://github.com/pip-webui/pip-webui/raw/master/doc/Logo.png" alt="Pip.WebUI Logo" style="max-width:30%"> <br/> Color Themes

![](https://img.shields.io/badge/license-MIT-blue.svg)

Pip.WebUI 2 Themes module contains a mechanism to define and dynamically switch color themes for both Angular Material and custom controls.

<a href="https://github.com/pip-webui2/pip-webui2-themes/raw/master/doc/images/image.png" style="display: block;">
    <img src="https://github.com/pip-webui2/pip-webui2-themes/raw/master/doc/images/image.png"/>
</a>

## Using

Add module to imports:
```typescript
import { PipThemesModule } from 'pip-webui2-themes';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    ...
    PipThemesModule,
    ...
  ],
  providers: [],

  bootstrap: [AppComponent]
})
export class AppModule { }
```

Use service to change theme, get theme list and name of current theme.
```typescript
import { PipThemesService, Theme } from 'pip-webui2-themes';

export class AppComponent {
    public themes: Theme[];
    public theme: Theme;

    constructor(
        private service: PipThemesService
    ) {
        this.themes = this.service.themes;
        this.theme = this.service.selectedTheme;
    }

    changeTheme() {
        this.service.selectedTheme = this.theme;
  }
}
```

Theme model:
```typescript
class Theme {
    name: string;
    palette: string = 'light';
}
```

## Installation

To install this module using npm:

```bash
npm install pip-webui2-themes --save
```

## <a name="license"></a>License

This module is released under [MIT license](License) and totally free for commercial and non-commercial use.

---
_Source: https://npm.io/package/pip-webui2-themes-temp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
