Skip to content

Commit

Permalink
fix: remote svg icon not rendering (#408)
Browse files Browse the repository at this point in the history
* docs(changeset): fix svg icon
* fix(ui): fix RemoteSvgIcon rendering
  • Loading branch information
riccardoperra authored Dec 9, 2022
1 parent 5822f2b commit 21746dc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/khaki-carpets-judge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@codeimage/ui': patch
---

fix svg icon
2 changes: 1 addition & 1 deletion apps/codeimage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset='utf-8'>
<meta name='theme-color'>
<meta name='apple-mobile-web-app-status-bar-style' content='dark-content'>
<link rel='icon' href='/assets/favicon.svg' type='image/svg+xml'>
<link rel='icon' href='/assets/favicon.ico'>
<link rel='preconnect' href='https://fonts.googleapis.com'>
<link rel='preconnect' href='https://fonts.gstatic.com' crossorigin='anonymous'>
<link rel='preload' href='/assets/codeimage-logo-blue-svg-v1.svg' as='image' type='image/svg+xml'>
Expand Down
Binary file added apps/codeimage/public/assets/favicon.ico
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/ui/src/lib/primitives/Icon/SvgIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ export function SvgIcon(props: SvgIconProps): JSX.Element {
const [local, others] = splitProps(props, ['class', 'children', 'viewBox']);

return (
// eslint-disable-next-line solid/jsx-no-duplicate-props
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
class={classes()}
viewBox={local.viewBox}
// eslint-disable-next-line solid/no-innerhtml
innerHTML={props.innerHTML ?? undefined}
{...others}
>
{props.children}
Expand Down

0 comments on commit 21746dc

Please sign in to comment.