UNPKG

mediasfu-reactnative-expo

Version:

mediasfu-reactnative-expo – Expo-managed React Native WebRTC SDK for video conferencing, webinars, live streaming, broadcast, screen sharing, whiteboard, chat, recording, live subtitles, translation, and AI agent rooms on iOS, Android, and web. Prebuilt r

27 lines (26 loc) 1.08 kB
import { ViewStyle, FlexAlignType } from 'react-native'; export interface ModalPositionStyle extends Pick<ViewStyle, 'justifyContent' | 'alignItems'> { alignItems?: FlexAlignType; } export interface GetModalPositionOptions { position: string; } export type GetModalPositionType = (options: GetModalPositionOptions) => ModalPositionStyle; /** * Gets the style for positioning a modal based on the specified position. * * @param {GetModalPositionOptions} options - Configuration options specifying the modal position. * @returns {ModalPositionStyle} - The style object for positioning the modal. * * @example * ```typescript * const centerStyle = getModalPosition({ position: "center" }); * console.log(centerStyle); * // Output: { justifyContent: "center", alignItems: "center" } * * const topLeftStyle = getModalPosition({ position: "topLeft" }); * console.log(topLeftStyle); * // Output: { justifyContent: "flex-start", alignItems: "flex-start" } * ``` */ export declare const getModalPosition: ({ position }: GetModalPositionOptions) => ModalPositionStyle;