Skip to content

Commit

Permalink
feat: createElement
Browse files Browse the repository at this point in the history
  • Loading branch information
HomyeeKing committed Oct 14, 2024
1 parent 57c1bd9 commit a497613
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions packages/jsx-runtime/src/createElement.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { createElement as reactCreateElement } from 'react';
import { hijackElementProps } from './style.js';
export function createElement(type: any, props: any, ...children: any[]) {
return reactCreateElement(type, hijackElementProps(props), ...children);
}
2 changes: 1 addition & 1 deletion packages/jsx-runtime/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './prod.js';
export { createElement } from 'react';
export { createElement } from './createElement.js';

0 comments on commit a497613

Please sign in to comment.