UNPKG

@arolariu/components

Version:

🎨 70+ beautiful, accessible React components built on Base UI. TypeScript-first, CSS Modules styling, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡

57 lines (56 loc) • 2.22 kB
"use client"; import { jsx, jsxs } from "react/jsx-runtime"; import { mergeProps } from "@base-ui/react/merge-props"; import { ScrollArea } from "@base-ui/react/scroll-area"; import { useRender } from "@base-ui/react/use-render"; import { cn } from "../../lib/utilities.js"; import scroll_area_module from "./scroll-area.module.js"; import * as __rspack_external_react from "react"; const scroll_area_ScrollArea = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{ const { className, children, render, ...otherProps } = props; return /*#__PURE__*/ jsxs(ScrollArea.Root, { ref: ref, ...otherProps, render: useRender({ defaultTagName: "div", render: render, props: mergeProps({ className: cn(scroll_area_module.root, className) }, {}) }), children: [ /*#__PURE__*/ jsx(ScrollArea.Viewport, { className: scroll_area_module.viewport, children: /*#__PURE__*/ jsx(ScrollArea.Content, { className: scroll_area_module.content, children: children }) }), /*#__PURE__*/ jsx(ScrollBar, {}), /*#__PURE__*/ jsx(ScrollArea.Corner, { className: scroll_area_module.corner }) ] }); }); function ScrollBar(props) { const { className, orientation = "vertical", render, ...otherProps } = props; return /*#__PURE__*/ jsx(ScrollArea.Scrollbar, { orientation: orientation, ...otherProps, render: useRender({ defaultTagName: "div", render: render, props: mergeProps({ className: cn(scroll_area_module.scrollbar, "vertical" === orientation ? scroll_area_module.vertical : scroll_area_module.horizontal, className) }, {}) }), children: /*#__PURE__*/ jsx(ScrollArea.Thumb, { className: scroll_area_module.thumb }) }); } scroll_area_ScrollArea.displayName = "ScrollArea"; ScrollBar.displayName = "ScrollBar"; export { ScrollBar, scroll_area_ScrollArea as ScrollArea }; //# sourceMappingURL=scroll-area.js.map