@gravity-ui/uikit
Version:
Gravity UI base styling and components
29 lines (28 loc) • 1.51 kB
TypeScript
import * as React from 'react';
import type { QAProps } from "../types.js";
import "./Sheet.css";
export interface SheetProps extends QAProps {
children?: React.ReactNode;
onClose?: () => void;
/** Show/hide sheet */
visible: boolean;
/** ID of the sheet, used as hash in URL. It's important to specify different `id` values if there can be more than one sheet on the page */
id?: string;
/** Title of the sheet window */
title?: string;
/** Class name for the sheet window */
className?: string;
/** Class name for the sheet content */
contentClassName?: string;
/** Class name for the swipe area */
swipeAreaClassName?: string;
/** Enable the behavior in which you can close the sheet window with a swipe down if the content is scrolled to its top (`contentNode.scrollTop === 0`) or has no scroll at all */
allowHideOnContentScroll?: boolean;
/** Hide top bar with resize handle */
hideTopBar?: boolean;
/** Coefficient that determines the maximum height of the `Sheet` relative to the height of the viewport (range 0-1) */
maxContentHeightCoefficient?: number;
/** `Sheet` height will always have the maximum value */
alwaysFullHeight?: boolean;
}
export declare const Sheet: ({ children, onClose, visible, id, title, className, contentClassName, swipeAreaClassName, allowHideOnContentScroll, hideTopBar, maxContentHeightCoefficient, alwaysFullHeight, qa, }: SheetProps) => import("react/jsx-runtime").JSX.Element | null;