Skip to content

Commit 21746dc

Browse files
fix: remote svg icon not rendering (#408)
* docs(changeset): fix svg icon * fix(ui): fix RemoteSvgIcon rendering
1 parent 5822f2b commit 21746dc

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

.changeset/khaki-carpets-judge.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@codeimage/ui': patch
3+
---
4+
5+
fix svg icon

apps/codeimage/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset='utf-8'>
55
<meta name='theme-color'>
66
<meta name='apple-mobile-web-app-status-bar-style' content='dark-content'>
7-
<link rel='icon' href='/assets/favicon.svg' type='image/svg+xml'>
7+
<link rel='icon' href='/assets/favicon.ico'>
88
<link rel='preconnect' href='https://fonts.googleapis.com'>
99
<link rel='preconnect' href='https://fonts.gstatic.com' crossorigin='anonymous'>
1010
<link rel='preload' href='/assets/codeimage-logo-blue-svg-v1.svg' as='image' type='image/svg+xml'>
279 KB
Binary file not shown.

packages/ui/src/lib/primitives/Icon/SvgIcon.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@ export function SvgIcon(props: SvgIconProps): JSX.Element {
1010
const [local, others] = splitProps(props, ['class', 'children', 'viewBox']);
1111

1212
return (
13+
// eslint-disable-next-line solid/jsx-no-duplicate-props
1314
<svg
1415
xmlns="http://www.w3.org/2000/svg"
1516
fill="none"
1617
class={classes()}
1718
viewBox={local.viewBox}
19+
// eslint-disable-next-line solid/no-innerhtml
20+
innerHTML={props.innerHTML ?? undefined}
1821
{...others}
1922
>
2023
{props.children}

0 commit comments

Comments
 (0)