Skip to content

Commit

Permalink
Bug/general fixes (#10)
Browse files Browse the repository at this point in the history
* 🔧 palette arrow navigation

* 🔧 fix browser module error

* 🎨 color scheme

* ⬆️ version upgrade
  • Loading branch information
gabriel-gn authored Mar 4, 2022
1 parent 2f5cbe5 commit 2bd8d23
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

| Angular Version | NPM Version |
|-----------------|-------------|
| 13.2.3 | 13.0.3 |
| 13.2.3 | 13.0.4 |
| < 13.0.0 | 0.0.77 |

## Reference
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mprisma/components",
"version": "13.0.3",
"version": "13.0.4",
"repository": {
"type": "git",
"url": "https://github.com/gabriel-gn/prisma-components.git"
Expand Down
10 changes: 7 additions & 3 deletions src/services/color-theme/color-theme.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,13 @@ export class ColorThemeService {
if (this.themeConfig && this.themeConfig.cookie) {
this.cookieService.set(this.themeConfig.cookie, theme);
}
Object.keys(themeObj).forEach(key =>
document.documentElement.style.setProperty(`--${key}`, `${themeObj[key]}`, 'important')
);
Object.keys(themeObj).forEach(key => {
if (key !== 'color-scheme') {
document.documentElement.style.setProperty(`--${key}`, `${themeObj[key]}`, 'important')
} else {
document.documentElement.style.setProperty(`${key}`, `${themeObj[key]}`, 'important')
}
});
this._theme = theme;
}

Expand Down
2 changes: 2 additions & 0 deletions src/styles/themes/dark/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
$color-scheme: dark;

/*******************************
* CORES
********************************/
Expand Down
2 changes: 2 additions & 0 deletions src/styles/themes/dark/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
********************************/

:root {
--color-scheme: #{$color-scheme};

@each $key, $val in $colors {
@if type-of($val) == color {
--#{$key}: #{$val};
Expand Down
2 changes: 2 additions & 0 deletions src/styles/themes/default/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
$color-scheme: normal;

/*******************************
* CORES
********************************/
Expand Down
3 changes: 3 additions & 0 deletions src/styles/themes/default/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
********************************/

:root {

--color-scheme: #{$color-scheme};

@each $key, $val in $colors {
@if type-of($val) == color {
--#{$key}: #{$val};
Expand Down
2 changes: 2 additions & 0 deletions src/styles/themes/light/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* CORES
********************************/

$color-scheme: light;

// CORES DE TEMA
$color-primary: #42ADB3 !default;
$color-secondary: #646F7E !default;
Expand Down
3 changes: 3 additions & 0 deletions src/styles/themes/light/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
********************************/

:root {

--color-scheme: #{$color-scheme};

@each $key, $val in $colors {
@if type-of($val) == color {
--#{$key}: #{$val};
Expand Down

1 comment on commit 2bd8d23

@vercel
Copy link

@vercel vercel bot commented on 2bd8d23 Mar 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.