Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle styling? #51

Open
Lioncat2002 opened this issue Aug 16, 2023 · 1 comment
Open

How to handle styling? #51

Lioncat2002 opened this issue Aug 16, 2023 · 1 comment

Comments

@Lioncat2002
Copy link

How do I handle inline styling?
currently something like

<div style{{background:"black"}}></div>

gets converted to

<div style></div>
@1111PP
Copy link

1111PP commented Oct 12, 2024

change function: updateDom
add this code

  const styleObj = newProps.style || {}
  Object.keys(styleObj).forEach((key) => (dom.style[key] = styleObj[key]))

and change function : isProperty
const isProperty = (key) =>
key !== 'children' && !isEvent(key) && key !== 'style'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants