UNPKG

@attio/react-native-bottom-sheet-toolbox

Version:
49 lines 2 kB
import * as React from "react"; import { type SharedValue } from "react-native-reanimated"; import { type SheetPosition } from "../utils"; /** * We want the bottom sheet's opacity to persist across new mounts. * However, we want to avoid polluting the internal context. */ interface BottomSheetToolboxInternalBackdropContextShape { opacitySharedValue: SharedValue<number>; hide: boolean; } export declare function NewBottomSheetToolboxBackdropProvider({ children, hide, }: React.PropsWithChildren<{ hide?: boolean; }>): React.JSX.Element; export declare function OldBottomSheetToolboxBackdropProvider({ children, inheritHide, hide, }: React.PropsWithChildren<{ hide?: boolean; inheritHide: boolean; }>): React.JSX.Element; export declare function BottomSheetToolboxBackdropProvider({ children, reset, hide, inheritHide, }: React.PropsWithChildren<{ reset?: boolean; hide?: boolean; inheritHide?: boolean; }>): React.JSX.Element; /** * Retrieve the bottom sheet internal context, and throw if unavailable. */ export declare function useBottomSheetToolboxBackdropContext(): BottomSheetToolboxInternalBackdropContextShape; export interface BottomSheetToolboxDefaultBackdropProps extends React.PropsWithChildren { /** * What opacity should the backdrop have? */ maxOpacity?: number; /** * What color should the backdrop be? */ color?: string; /** * At what position should the backdrop reach its max opacity? * The default strategy is to use the first non-zero snap point. */ maxOpacityPoint?: SheetPosition; /** * Convenience alternative to maxOpacityPoint for selecting SnapPoints. */ maxOpacitySnapIndex?: number; } export declare function BottomSheetToolboxDefaultBackdrop({ maxOpacity, color, children, maxOpacityPoint, maxOpacitySnapIndex, }: BottomSheetToolboxDefaultBackdropProps): React.JSX.Element | null; export {}; //# sourceMappingURL=bottom-sheet-toolbox-default-backdrop.d.ts.map