mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 12:37:49 +00:00
* feat(mobile/navigation) updated screens that have footer * feat(chat/native) reverted style change * feat(chat/native) reverted changes and added input vertical padding * feat(base/modal) replaced headerHeight with top safe area inset * feat(carmode/native) removed unused import and fixed linter * feat(chat/polls/native) reverted style changes * feat(base/modal) added isModalPresentation default prop * feat(base/modal) made isModalPresentation optional * feat(base/modal) headerHeight based on top notch devices * feat(polls) updated styles * feat(base/modal) updated comment
86 lines
2.0 KiB
JavaScript
86 lines
2.0 KiB
JavaScript
// @flow
|
|
|
|
import React from 'react';
|
|
import { View } from 'react-native';
|
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
|
|
import { StyleType } from '../../styles';
|
|
|
|
import JitsiKeyboardAvoidingView from './JitsiKeyboardAvoidingView';
|
|
import styles from './styles';
|
|
|
|
|
|
type Props = {
|
|
|
|
/**
|
|
* Additional style to be appended to the KeyboardAvoidingView content container.
|
|
*/
|
|
contentContainerStyle?: StyleType,
|
|
|
|
/**
|
|
* The children component(s) of the Modal, to be rendered.
|
|
*/
|
|
children: React$Node,
|
|
|
|
/**
|
|
* Optional function that renders a footer component, if needed.
|
|
*/
|
|
footerComponent?: Function,
|
|
|
|
/**
|
|
* Is a text input rendered at the bottom of the screen?
|
|
*/
|
|
hasBottomTextInput?: boolean,
|
|
|
|
/**
|
|
* Is the screen rendering a tab navigator?
|
|
*/
|
|
hasTabNavigator?: boolean,
|
|
|
|
/**
|
|
* Is the screen presented as a modal?
|
|
*/
|
|
isModalPresentation?: boolean,
|
|
|
|
/**
|
|
* Insets for the SafeAreaView.
|
|
*/
|
|
safeAreaInsets?: Array,
|
|
|
|
/**
|
|
* Additional style to be appended to the KeyboardAvoidingView containing the content of the modal.
|
|
*/
|
|
style?: StyleType
|
|
}
|
|
|
|
const JitsiScreen = ({
|
|
contentContainerStyle,
|
|
children,
|
|
footerComponent,
|
|
hasTabNavigator = false,
|
|
hasBottomTextInput = false,
|
|
isModalPresentation = true,
|
|
safeAreaInsets = [ 'left', 'right' ],
|
|
style
|
|
}: Props) => (
|
|
<View
|
|
style = { styles.jitsiScreenContainer }>
|
|
<JitsiKeyboardAvoidingView
|
|
contentContainerStyle = { contentContainerStyle }
|
|
hasBottomTextInput = { hasBottomTextInput }
|
|
hasTabNavigator = { hasTabNavigator }
|
|
isModalPresentation = { isModalPresentation }
|
|
style = { style }>
|
|
<SafeAreaView
|
|
edges = { safeAreaInsets }
|
|
style = { styles.safeArea }>
|
|
{ children }
|
|
</SafeAreaView>
|
|
{ footerComponent && footerComponent() }
|
|
</JitsiKeyboardAvoidingView>
|
|
</View>
|
|
);
|
|
|
|
|
|
export default JitsiScreen;
|