53 lines
2.2 KiB
TypeScript
53 lines
2.2 KiB
TypeScript
// Metro module 10818 (f10819).
|
|
import { useCallback } from "react";
|
|
import { Image as Image2, View } from "react-native";
|
|
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../../_bundle/Module712";
|
|
import useParticipantTileTapGesture from "../useParticipantTileTapGesture";
|
|
import { GestureDetector } from "../../../../_bundle/Module5273";
|
|
import Module10543 from "../../../../_bundle/Module10543";
|
|
import { Text } from "../../../../design/components/Text/native/Text";
|
|
import { intl, t } from "../../../../intl/index.native";
|
|
import { Button } from "../../../../design/components/Button/native/Button.native";
|
|
import { stopScreenshare } from "../useScreenshareUtils";
|
|
const useStyles = createStyles({
|
|
container: {
|
|
alignItems: "center",
|
|
justifyContent: "center",
|
|
flex: 1,
|
|
backgroundColor: Module712.colors.BACKGROUND_BASE_LOW
|
|
},
|
|
image: {
|
|
marginBottom: 12
|
|
},
|
|
title: {
|
|
textAlign: "center",
|
|
marginBottom: 8
|
|
},
|
|
description: {
|
|
lineHeight: 18,
|
|
textAlign: "center",
|
|
marginBottom: 16
|
|
}
|
|
});
|
|
export default function ScreenshareParticipant(props) {
|
|
const { participant, onSingleTap, onDoubleTap, containerStyle } = props;
|
|
const participantTileTapGesture = useParticipantTileTapGesture({
|
|
onSingleTapStart: useCallback(() => onSingleTap == null ? void 0 : onSingleTap(participant), [onSingleTap, participant]),
|
|
onDoubleTapStart: useCallback(() => onDoubleTap == null ? void 0 : onDoubleTap(participant), [onDoubleTap, participant])
|
|
});
|
|
const styles = useStyles();
|
|
return <GestureDetector gesture={participantTileTapGesture}>
|
|
<View style={[styles.container, containerStyle]}>
|
|
<Image2 source={Module10543} style={styles.image} />
|
|
<Text style={styles.title} accessibilityRole="header" variant="heading-lg/extrabold" color="mobile-text-heading-primary">
|
|
{intl.string(t.gMOwov)}
|
|
</Text>
|
|
<Text style={styles.description} variant="text-sm/medium" color="interactive-text-default">
|
|
{intl.string(t.dKeLGt)}
|
|
</Text>
|
|
<Button variant="primary-overlay" text={intl.string(t.CpkXwZ)} onPress={stopScreenshare} />
|
|
</View>
|
|
</GestureDetector>;
|
|
};
|