UNPKG

mediasfu-reactnative

Version:
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;