@polymorphic-factory/solid
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -28,4 +28,6 @@ "use strict"; | ||
// src/polymorphic-factory.tsx | ||
var import_web = require("solid-js/web"); | ||
var import_web2 = require("solid-js/web"); | ||
var import_solid_js = require("solid-js"); | ||
var import_web = require("solid-js/web"); | ||
var import_web3 = require("solid-js/web"); | ||
function defaultStyled(originalComponent) { | ||
@@ -35,6 +37,10 @@ return (props) => { | ||
const component = local.as || originalComponent; | ||
return <import_web.Dynamic component={component} {...others} />; | ||
return (0, import_web.createComponent)(import_web3.Dynamic, (0, import_web2.mergeProps)({ | ||
component | ||
}, others)); | ||
}; | ||
} | ||
function polymorphicFactory({ styled = defaultStyled } = {}) { | ||
function polymorphicFactory({ | ||
styled = defaultStyled | ||
} = {}) { | ||
const cache = /* @__PURE__ */ new Map(); | ||
@@ -41,0 +47,0 @@ return new Proxy(styled, { |
// src/polymorphic-factory.tsx | ||
import { createComponent as _$createComponent } from "solid-js/web"; | ||
import { mergeProps as _$mergeProps } from "solid-js/web"; | ||
import { splitProps } from "solid-js"; | ||
@@ -8,6 +10,10 @@ import { Dynamic } from "solid-js/web"; | ||
const component = local.as || originalComponent; | ||
return <Dynamic component={component} {...others} />; | ||
return _$createComponent(Dynamic, _$mergeProps({ | ||
component | ||
}, others)); | ||
}; | ||
} | ||
function polymorphicFactory({ styled = defaultStyled } = {}) { | ||
function polymorphicFactory({ | ||
styled = defaultStyled | ||
} = {}) { | ||
const cache = /* @__PURE__ */ new Map(); | ||
@@ -14,0 +20,0 @@ return new Proxy(styled, { |
{ | ||
"name": "@polymorphic-factory/solid", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "", | ||
@@ -32,2 +32,4 @@ "keywords": [], | ||
"clean-package": "2.1.2", | ||
"esbuild": "0.15.14", | ||
"esbuild-plugin-solid": "0.4.2", | ||
"jsdom": "20.0.2", | ||
@@ -38,3 +40,3 @@ "solid-js": "1.6.2", | ||
"typescript": "4.8.4", | ||
"vite": "3.2.3", | ||
"vite": "3.2.4", | ||
"vite-plugin-solid": "2.4.0", | ||
@@ -41,0 +43,0 @@ "vitest": "0.25.1" |
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
10830
135
16