Skip to content

Commit

Permalink
feat: add parsing of theme.faviconPath
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai Volland committed Apr 23, 2024
1 parent 47e0934 commit 1d44259
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/bootstrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,20 @@ const parseTheme = (theme?: DefaultApplicationTheme): ThemeProperties => {
if (theme.secondaryColor) {
style['--complementaryColor'] = theme.complementaryColor;
}
if (theme.faviconPath) {

Check failure on line 458 in src/bootstrap.tsx

View workflow job for this annotation

GitHub Actions / build

Property 'faviconPath' does not exist on type 'DefaultApplicationTheme'.
const favicon = document.querySelector('link[rel="shortcut icon"]') as HTMLLinkElement;
if (favicon) {
favicon.href = theme.faviconPath;

Check failure on line 461 in src/bootstrap.tsx

View workflow job for this annotation

GitHub Actions / build

Property 'faviconPath' does not exist on type 'DefaultApplicationTheme'.
} else {
// If no favicon is set, create a new one
const newLink = document.createElement('link');
newLink.rel = 'shortcut icon';
newLink.type = 'image/x-icon';
newLink.href = theme.faviconPath;

Check failure on line 467 in src/bootstrap.tsx

View workflow job for this annotation

GitHub Actions / build

Property 'faviconPath' does not exist on type 'DefaultApplicationTheme'.
document.head.appendChild(newLink);
}
}

return style;
};

Expand Down

0 comments on commit 1d44259

Please sign in to comment.