Skip to content

Commit f99307c

Browse files
Fix workaround for style prop
1 parent b08a84d commit f99307c

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@dominative/solid",
3-
"version": "0.0.1-alpha.2",
3+
"version": "0.0.1-alpha.3",
44
"description": "Custom render and patches for SolidJS to work with DOMiNATIVE",
55
"main": "src/index.js",
66
"type": "module",

src/renderer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ export const {
2424
textNode.nodeValue = value
2525
},
2626
setProperty(node, name, value) {
27-
if (name.startsWith('on:')) node.addEventListener(name.slice(3), value)
27+
if (name === 'style') {
28+
Object.assign(node.style, value)
29+
} else if (name.startsWith('on:')) node.addEventListener(name.slice(3), value)
2830
else if (name.startsWith('oncapture:')) node.addEventListener(name.slice(10), value, true)
2931
else {
3032
if (process.env.NODE_ENV !== 'production' && name.startsWith('on')) console.warn(`[DOMiSOLID] For event handlers, pleas use 'on:eventName' or 'oncapture:eventName'.`)

0 commit comments

Comments
 (0)