mediasfu-angular
Version:
mediasfu-angular - Angular 17/18/19 WebRTC SDK for video conferencing, webinars, broadcasts, live streaming, chat, recording, whiteboard, and AI agents. Prebuilt rooms and fully custom UIs.
23 lines (22 loc) • 1.04 kB
TypeScript
import { ModalPositionStyle } from '../../@types/types';
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 - Object containing the desired modal position.
* @param {string} options.position - The modal position ('center', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight').
* @returns {ModalPositionStyle} - Style object for aligning the modal according to the specified position.
*
* @example
* ```typescript
* const positionStyle = getModalPosition({ position: 'center' });
* // Output: { justifyContent: 'center', alignItems: 'center' }
*
* const topLeftStyle = getModalPosition({ position: 'topLeft' });
* // Output: { justifyContent: 'flex-start', alignItems: 'flex-start' }
* ```
*/
export declare function getModalPosition({ position }: GetModalPositionOptions): ModalPositionStyle;