@hypothesis/frontend-shared
Version:
Shared components, styles and utilities for Hypothesis projects
14 lines (13 loc) • 625 B
TypeScript
import type { JSX } from 'preact';
import type { PresentationalProps } from '../../types';
export type ScrollContainerProps = PresentationalProps & {
/** Remove border around container */
borderless?: boolean;
/** Add rounded corners to scrollable container */
rounded?: boolean;
} & JSX.HTMLAttributes<HTMLDivElement>;
/**
* Constrain children (which may include both scrollable and non-scrolling
* content) to the dimensions of the immediate parent.
*/
export default function ScrollContainer({ children, classes, elementRef, borderless, rounded, ...htmlAttributes }: ScrollContainerProps): JSX.Element;