UNPKG

@mijn-ui/react-scroll-area

Version:

A custom scrollable container for overflowing content.

31 lines (28 loc) 2.01 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import * as tailwind_variants from 'tailwind-variants'; import * as _mijn_ui_react_theme from '@mijn-ui/react-theme'; import { UnstyledComponentWithSlots, ScrollAreaSlots, UnstyledProps } from '@mijn-ui/react-theme'; import * as React from 'react'; import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area'; type ScrollAreaBaseProps = UnstyledComponentWithSlots<ScrollAreaSlots>; declare const useScrollAreaStyles: (unstyledOverride?: boolean) => { classNames: _mijn_ui_react_theme.SlotsToClasses<"base" | "viewport" | "scrollbar" | "scrollThumb"> | undefined; isUnstyled: boolean | undefined; base: (slotProps?: ({ orientation?: "horizontal" | "vertical" | undefined; } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined; viewport: (slotProps?: ({ orientation?: "horizontal" | "vertical" | undefined; } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined; scrollbar: (slotProps?: ({ orientation?: "horizontal" | "vertical" | undefined; } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined; scrollThumb: (slotProps?: ({ orientation?: "horizontal" | "vertical" | undefined; } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined; }; type ScrollAreaProps = React.ComponentPropsWithRef<typeof ScrollAreaPrimitive.Root> & ScrollAreaBaseProps; declare const ScrollArea: ({ unstyled, classNames, className, children, ...props }: ScrollAreaProps) => react_jsx_runtime.JSX.Element; type ScrollBarProps = React.ComponentPropsWithRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar> & UnstyledProps; declare const ScrollBar: ({ unstyled, className, orientation, ...props }: ScrollBarProps) => react_jsx_runtime.JSX.Element; export { ScrollArea, type ScrollAreaProps, ScrollBar, useScrollAreaStyles };