ohctechv3/.svn/pristine/53/537df99215fb0c7be57b74c4f8905eee1a7834ea.svn-base
2024-10-28 15:03:36 +05:30

23 lines
660 B
Plaintext

// @flow
import * as ReactJSXRuntime from 'react/jsx-runtime'
import Emotion, { createEmotionProps } from './emotion-element'
import { hasOwn } from './utils'
export const Fragment = ReactJSXRuntime.Fragment
export function jsx(type: any, props: any, key: any) {
if (!hasOwn.call(props, 'css')) {
return ReactJSXRuntime.jsx(type, props, key)
}
return ReactJSXRuntime.jsx(Emotion, createEmotionProps(type, props), key)
}
export function jsxs(type: any, props: any, key: any) {
if (!hasOwn.call(props, 'css')) {
return ReactJSXRuntime.jsxs(type, props, key)
}
return ReactJSXRuntime.jsxs(Emotion, createEmotionProps(type, props), key)
}