Feature Request and Question: How to get all registered themes with Nebular themeservice?
- Langage dominant
- TypeScript
- Étoiles
- 8.1k
- Forks
- 1.5k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
### Issue type
**I'm submitting a ...** (check one with "x")
* [ ] bug report
* [x] feature request
* [x] Question
### Issue description
Feature request: At present registering new theme requires manually entering data for theme in theme.scss
```
$nb-themes: nb-register-theme((
layout-padding-top: 2.25rem,
menu-item-icon-margin: 0 0.5rem 0 0,
card-height-tiny: 13.5rem,
card-height-small: 21.1875rem,
card-height-medium: 28.875rem,
card-height-large: 36.5625rem,
card-height-giant: 44.25rem,
card-margin-bottom: 1.875rem,
card-header-with-select-padding-top: 0.5rem,
card-header-with-select-padding-bottom: 0.5rem,
select-min-width: 6rem,
slide-out-background: linear-gradient(270deg, #222b45 0%, #151a30 100%),
slide-out-shadow-color: 0 4px 14px 0 #8f9bb3,
slide-out-shadow-color-rtl: 0 4px 14px 0 #8f9bb3,
), dark, dark);
```
Would it be possible to have method in NbThemeSystem to register the theme there by allowing dynamic generation of themes at run time?
### Use case for this request:
This ability will enable developers to create UI for Theme creation and modification. Which can be used by user in application. These themes can than be saved as part of user profile.
Now the question:
How can I get all registered themes with Nebular Theme system?
**Current behavior:**
Currently one has to manually keep track of the themes like so
```
themes = [
{
value: 'default',
name: 'Light',
},
{
value: 'dark',
name: 'Dark',
},
{
value: 'cosmic',
name: 'Cosmic',
},
{
value: 'corporate',
name: 'Corporate',
},
{
value: 'paper',
name: 'Paper',
},
];
```
Keeping track of theme for run time theme change becomes tedious.
There is no programmatic way to get all registered themes
**Expected behavior:**
I would expect to have
1. Register theme using RegisterTheme( themeOptions) methond on NbThemeService
2. Get all registered themes by accessing getRegisteredThemes() method on NbThemeService.
### Other information:
**Angular, Nebular**
```
Nebular 4.x
```
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.