UNPKG

one

Version:

One is a new React Framework that makes Vite serve both native and web.

20 lines (19 loc) 556 B
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.mjs.map