@kadoui/react
Version:
Kadoui primitive components for React
16 lines (15 loc) • 507 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
export function SheetContent({ style, onScroll, ...p }) {
return (_jsx("div", { style: {
touchAction: "pan-down",
...style,
}, onScroll: (ev) => {
if (ev.currentTarget.scrollTop > 0) {
ev.currentTarget.style.touchAction = "pan-y";
}
else {
ev.currentTarget.style.touchAction = "pan-down";
}
onScroll?.(ev);
}, ...p }));
}