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