UNPKG

@cometchat/chat-uikit-react-native

Version:

Ready-to-use Chat UI Components for React Native

60 lines (59 loc) 1.87 kB
import React from "react"; import { DimensionValue } from "react-native"; /** * Props for the CometChatBottomSheet component. */ export interface CometChatBottomSheetInterface { /** * Content to be rendered inside the bottom sheet. */ children?: any; /** * Determines whether the bottom sheet is open. */ isOpen?: boolean; /** * Callback function invoked when the bottom sheet is opened. */ onOpen?: Function; /** * Callback function invoked when the bottom sheet is requested to close. */ onClose?: Function; /** * iOS specific callback invoked when the modal is dismissed. */ onDismiss?: () => void; /** * Custom styles for the bottom sheet. */ style?: { shadowColor?: string; backgroundColor?: string; lineColor?: string; lineHeight?: number; paddingHorizontal?: number; borderRadius?: number; paddingBottom?: number; maxHeight?: DimensionValue; minHeight?: DimensionValue; }; /** * Enables scrolling for the bottom sheet content. */ scrollEnabled?: boolean; /** * When rendering a FlatList, pass this as true to enable {height: 100%}. */ doNotOccupyEntireHeight?: boolean; } /** * CometChatBottomSheet is a component that renders a modal bottom sheet. * It provides a customizable bottom sheet with overlay fade effect and keyboard handling. * * @param {CometChatBottomSheetInterface} props - Props for the bottom sheet component. * @param {React.Ref<any>} ref - Reference object to expose component methods. * @returns {JSX.Element} The rendered modal bottom sheet. */ declare const CometChatBottomSheet: React.ForwardRefExoticComponent<CometChatBottomSheetInterface & React.RefAttributes<unknown>>; export { CometChatBottomSheet };