solid-icons
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -1,2 +0,2 @@ | ||
import { spread, insert, isServer, memo, effect, setAttribute, style, template } from 'solid-js/web'; | ||
import { mergeProps, spread, insert, isServer, memo, effect, setAttribute, style, template } from 'solid-js/web'; | ||
@@ -6,9 +6,8 @@ const _tmpl$ = /*#__PURE__*/template(`<svg fill="currentColor" stroke-width="0" xmlns="http://www.w3.org/2000/svg"></svg>`, 2), | ||
function IconTemplate(iconSrc, props) { | ||
const mergedProps = mergeProps(iconSrc.a, props); | ||
return (() => { | ||
const _el$ = _tmpl$.cloneNode(true); | ||
spread(_el$, () => iconSrc.a, true, true); | ||
spread(_el$, mergedProps, true, true); | ||
spread(_el$, props, true, true); | ||
insert(_el$, () => isServer && iconSrc.c, null); | ||
@@ -15,0 +14,0 @@ |
@@ -1,3 +0,4 @@ | ||
import { isServer } from "solid-js/web"; | ||
import { isServer, mergeProps } from "solid-js/web"; | ||
export function IconTemplate(iconSrc, props) { | ||
const mergedProps = mergeProps(iconSrc.a, props); | ||
return (<svg stroke={iconSrc.a.stroke} fill="currentColor" stroke-width="0" style={{ | ||
@@ -7,3 +8,3 @@ ...props.style, | ||
color: props.color || "currentColor", | ||
}} {...iconSrc.a} {...props} height={props.size || "1em"} width={props.size || "1em"} innerHTML={iconSrc.c} xmlns="http://www.w3.org/2000/svg"> | ||
}} {...mergedProps} height={props.size || "1em"} width={props.size || "1em"} innerHTML={iconSrc.c} xmlns="http://www.w3.org/2000/svg"> | ||
{isServer && iconSrc.c} | ||
@@ -10,0 +11,0 @@ {props.title && <title>{props.title}</title>} |
{ | ||
"name": "solid-icons", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Modern solution for use icons on SolidJS", | ||
@@ -20,4 +20,4 @@ "author": "Ignacio Zsabo", | ||
}, | ||
"dependencies": { | ||
"solid-js": "<=1.5.7" | ||
"peerDependencies": { | ||
"solid-js": "*" | ||
}, | ||
@@ -24,0 +24,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26641949
282443
+ Addedseroval@1.2.0(transitive)
+ Addedseroval-plugins@1.2.0(transitive)
+ Addedsolid-js@1.9.4(transitive)
- Removedsolid-js@<=1.5.7
- Removedsolid-js@1.5.7(transitive)