one
Version:
One is a new React Framework that makes Vite serve both native and web.
23 lines (22 loc) • 637 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { Slot as RUISlot } from "@radix-ui/react-slot";
import { forwardRef, useMemo } from "react";
import { StyleSheet } from "react-native";
function ShimSlotForReactNative(Component) {
return /* @__PURE__ */forwardRef(function (param, ref) {
var {
style,
...props
} = param;
return style = useMemo(function () {
return StyleSheet.flatten(style);
}, [style]), /* @__PURE__ */_jsx(Component, {
ref,
...props,
style
});
});
}
var Slot = ShimSlotForReactNative(RUISlot);
export { Slot };
//# sourceMappingURL=Slot.native.js.map