UNPKG

@anoki/fse-ui

Version:

FSE UI components library

33 lines (32 loc) 1.46 kB
import { __rest as k, __assign as r } from "./index.es500.js"; import * as a from "react"; import { zeroRightClassName as E, fullWidthClassName as I } from "./index.es510.js"; import { effectCar as Z } from "./index.es511.js"; import { useMergeRefs as W } from "./index.es512.js"; var o = function() { }, m = a.forwardRef(function(e, d) { var l = a.useRef(null), n = a.useState({ onScrollCapture: o, onWheelCapture: o, onTouchMoveCapture: o }), f = n[0], h = n[1], u = e.forwardProps, t = e.children, v = e.className, C = e.removeScrollBar, g = e.enabled, P = e.shards, R = e.sideCar, S = e.noIsolation, b = e.inert, w = e.allowPinchZoom, s = e.as, N = s === void 0 ? "div" : s, M = e.gapMode, _ = k(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), B = R, i = W([l, d]), c = r(r({}, _), f); return a.createElement( a.Fragment, null, g && a.createElement(B, { sideCar: Z, removeScrollBar: C, shards: P, noIsolation: S, inert: b, setCallbacks: h, allowPinchZoom: !!w, lockRef: l, gapMode: M }), u ? a.cloneElement(a.Children.only(t), r(r({}, c), { ref: i })) : a.createElement(N, r({}, c, { className: v, ref: i }), t) ); }); m.defaultProps = { enabled: !0, removeScrollBar: !0, inert: !1 }; m.classNames = { fullWidth: I, zeroRight: E }; export { m as RemoveScroll }; //# sourceMappingURL=index.es501.js.map