Skip to content

Commit

Permalink
fix: set color to currentColor if undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
ju-Skinner committed Aug 2, 2024
1 parent ae91458 commit d2e6d5e
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
50 changes: 50 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/components/pds-icon/pds-icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class PdsIcon {
setCSSVariables() {
this.el.style.setProperty(`--dimension-icon-height`, this.iconSize());
this.el.style.setProperty(`--dimension-icon-width`, this.iconSize());
this.el.style.setProperty(`--color-icon-fill`, this.color);
this.el.style.setProperty(`--color-icon-fill`, typeof this.color !== 'undefined' ? this.color : 'currentColor');
}

connectedCallback() {
Expand Down

0 comments on commit d2e6d5e

Please sign in to comment.