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