UNPKG

soda-material

Version:

A component library that may follow [material design 3](https://m3.material.io/components) (a.k.a. material you)

30 lines (29 loc) 1.09 kB
/// <reference types="react" /> import './sheet.scss'; export type BottomSheetHandle = ReturnType<typeof drag>; /** * This component use ref to control, so it's ref is not a element * but an object that holds controller functions * @specs https://m3.material.io/components/bottom-sheets/specs */ export declare const BottomSheet: import("react").ForwardRefExoticComponent<{ children?: React.ReactNode; hideDragHandle?: boolean | undefined; onChange?: ((visiable: boolean) => void) | undefined; onScrimClick?(): void; portalTo?: Element | DocumentFragment | undefined; } & Omit<import("react").HTMLProps<HTMLElement>, "ref" | "children" | "onChange" | "hideDragHandle" | "onScrimClick" | "portalTo"> & import("react").RefAttributes<{ cleanup: () => void; show: () => void; hide: () => void; visiable(): boolean; }>>; export declare function drag(dragHandle: HTMLDivElement, sheet: HTMLDivElement, options?: { onShow?(): void; onHide?(): void; }): { cleanup: () => void; show: () => void; hide: () => void; visiable(): boolean; };