Skip to content

Commit

Permalink
fix(jsx): handle className
Browse files Browse the repository at this point in the history
  • Loading branch information
krulod committed Oct 24, 2023
1 parent e97b918 commit 37d0ee3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/jsx/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ export const reatomJsx = (ctx: Ctx) => {
}

const setProp = (element: Element, key: string, val: any) => {
if (key === 'className') key = 'class'

if (key.startsWith('field:')) {
;(element as any)[key.slice(6)] = val
} else if (key === 'style') {
Expand Down

0 comments on commit 37d0ee3

Please sign in to comment.