Files
coopgo/node_modules/@emotion/react/src/jsx-runtime.js
sgauthier 6e64e138e2
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
planning
2024-10-14 09:15:30 +02:00

22 lines
621 B
JavaScript

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, props, key) {
if (!hasOwn.call(props, 'css')) {
return ReactJSXRuntime.jsx(type, props, key)
}
return ReactJSXRuntime.jsx(Emotion, createEmotionProps(type, props), key)
}
export function jsxs(type, props, key) {
if (!hasOwn.call(props, 'css')) {
return ReactJSXRuntime.jsxs(type, props, key)
}
return ReactJSXRuntime.jsxs(Emotion, createEmotionProps(type, props), key)
}