@mijn-ui/react-scroll-area
Version:
A custom scrollable container for overflowing content.
81 lines (77 loc) • 3.19 kB
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import * as tailwind_merge from 'tailwind-merge';
import * as _mijn_ui_react_core from '@mijn-ui/react-core';
import { UnstyledComponentWithSlots } from '@mijn-ui/react-core';
import * as tailwind_variants from 'tailwind-variants';
import { VariantProps } from 'tailwind-variants';
import * as React from 'react';
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
declare const scrollAreaStyles: tailwind_variants.TVReturnType<{
orientation: {
vertical: {
scrollbar: string;
};
horizontal: {
scrollbar: string;
};
};
}, {
base: string;
viewport: string;
scrollbar: string;
scrollThumb: string;
}, undefined, {
orientation: {
vertical: {
scrollbar: string;
};
horizontal: {
scrollbar: string;
};
};
}, {
base: string;
viewport: string;
scrollbar: string;
scrollThumb: string;
}, tailwind_variants.TVReturnType<{
orientation: {
vertical: {
scrollbar: string;
};
horizontal: {
scrollbar: string;
};
};
}, {
base: string;
viewport: string;
scrollbar: string;
scrollThumb: string;
}, undefined, unknown, unknown, undefined>>;
type ScrollAreaVariantProps = VariantProps<typeof scrollAreaStyles>;
type ScrollAreaSlots = keyof ReturnType<typeof scrollAreaStyles>;
type ScrollAreaBaseProps = UnstyledComponentWithSlots<ScrollAreaSlots>;
declare const useScrollAreaStyles: (unstyledOverride?: boolean) => {
classNames: _mijn_ui_react_core.SlotsToClasses<"base" | "viewport" | "scrollbar" | "scrollThumb"> | undefined;
isUnstyled: boolean | undefined;
base: (slotProps?: ({
orientation?: "vertical" | "horizontal" | undefined;
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
viewport: (slotProps?: ({
orientation?: "vertical" | "horizontal" | undefined;
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
scrollbar: (slotProps?: ({
orientation?: "vertical" | "horizontal" | undefined;
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
scrollThumb: (slotProps?: ({
orientation?: "vertical" | "horizontal" | undefined;
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | 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> & {
unstyled?: boolean;
};
declare const ScrollBar: ({ unstyled, className, orientation, ...props }: ScrollBarProps) => react_jsx_runtime.JSX.Element;
export { ScrollArea, type ScrollAreaProps, type ScrollAreaSlots, type ScrollAreaVariantProps, ScrollBar, scrollAreaStyles, useScrollAreaStyles };