UNPKG

@funkit/connect

Version:

Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.

28 lines (27 loc) 1.46 kB
import * as React from 'react'; import { type BoxProps } from '../../components/Box/Box'; /** Discount scrollbar width, except on Safari */ export declare function subtractScrollbarWidth(padding: number): number; interface PaddedScrollableAreaProps { children: React.ReactNode; className?: string; /** Controls whether the scrollbar thumb is visible. Pass `isScrolling` from useScrollDivider. */ isScrolling: boolean; /** Nominal right-side padding in px (matches what a non-scrolling sibling uses). * Internal paddingRight is set to `padding - SCROLL_BAR_WIDTH` so that the scrollbar * occupies the remaining space and content always sees `padding` px on the right. */ padding: number; /** Optional bottom padding (sprinkle value) applied inside the scroll area, e.g. when no bottom bar is present. */ paddingBottom?: BoxProps['paddingBottom']; style?: React.CSSProperties; } /** * A flex-1 scrollable container with a thin (6px) rounded scrollbar that reserves * stable gutter space. The scrollbar thumb is hidden when not scrolling and appears * on hover/active scroll. * * paddingRight is automatically calculated as `padding - SCROLL_BAR_WIDTH` so that * content appears to have `padding`px of right-side spacing regardless of scrollbar state. */ export declare const PaddedScrollableArea: React.ForwardRefExoticComponent<PaddedScrollableAreaProps & React.RefAttributes<HTMLDivElement>>; export {};