Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
import { isSlot } from '@fluentui/react-utilities';
import * as React from 'react';
import { createCompatSlotComponent } from '../utils/createCompatSlotComponent';
import { warnIfElementTypeIsInvalid } from '../utils/warnIfElementTypeIsInvalid';
export function createJSX(runtime, slotRuntime) {
return function jsx(type, overrideProps, key, source, self) {
// TODO:
// this is for backwards compatibility with getSlotsNext
// it should be removed once getSlotsNext is obsolete
if (isSlot(overrideProps)) {
return slotRuntime(createCompatSlotComponent(type, overrideProps), null, key, source, self);
}
if (isSlot(type)) {
return slotRuntime(type, overrideProps, key, source, self);
}
warnIfElementTypeIsInvalid(type);
return runtime(type, overrideProps, key, source, self);
};
}