mediasfu-reactnative
Version:
MediaSFU Prebuilt React Native SDK
69 lines (68 loc) • 2.44 kB
TypeScript
import React from 'react';
import { StyleProp, TextStyle } from 'react-native';
/**
* Interface defining the props for the MeetingProgressTimer component.
*/
export interface MeetingProgressTimerOptions {
/**
* The current progress time of the meeting to be displayed.
*/
meetingProgressTime: string;
/**
* The initial background color of the timer.
* @default 'green'
*/
initialBackgroundColor?: string;
/**
* The position of the timer on the screen.
* @default 'topLeft'
*/
position?: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
/**
* Additional styles to apply to the timer text.
*/
textStyle?: StyleProp<TextStyle>;
/**
* Flag to determine whether the timer should be displayed.
* @default true
*/
showTimer?: boolean;
}
export type MeetingProgressTimerType = (options: MeetingProgressTimerOptions) => JSX.Element;
/**
* MeetingProgressTimer displays a timer badge indicating the progress time of a meeting, with customizable positioning and styles.
*
* This component is designed to show a timer in one of four corner positions with optional styling and background color customization.
*
* @component
* @param {MeetingProgressTimerOptions} props - Configuration options for MeetingProgressTimer.
* @param {string} props.meetingProgressTime - The current progress time of the meeting to display.
* @param {string} [props.initialBackgroundColor='green'] - Background color of the timer badge.
* @param {'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'} [props.position='topLeft'] - Position of the timer on the screen.
* @param {StyleProp<TextStyle>} [props.textStyle] - Additional styles for the timer text.
* @param {boolean} [props.showTimer=true] - Controls whether the timer is visible.
*
* @returns {JSX.Element} The MeetingProgressTimer component.
*
* @example
* ```tsx
* import React from 'react';
* import { MeetingProgressTimer } from 'mediasfu-reactnative';
*
* function App() {
* return (
* <MeetingProgressTimer
* meetingProgressTime="15:30"
* initialBackgroundColor="blue"
* position="bottomRight"
* showTimer={true}
* textStyle={{ color: 'white', fontSize: 16 }}
* />
* );
* }
*
* export default App;
* ```
*/
declare const MeetingProgressTimer: React.FC<MeetingProgressTimerOptions>;
export default MeetingProgressTimer;