forked from Ivasoft/mattermost-mobile
* User profile * Access User Profile from reaction list * Fix threads participants list & open user profile on tap * Extra bottom padding * Profile long press tutorial * Adjust heights * Reduce label margin from 12 to 8
63 lines
1.7 KiB
TypeScript
63 lines
1.7 KiB
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import React from 'react';
|
|
import {StyleProp, StyleSheet, Text, TextStyle, View, ViewStyle} from 'react-native';
|
|
|
|
import {useTheme} from '@context/theme';
|
|
import {makeStyleSheetFromTheme} from '@utils/theme';
|
|
import {typography} from '@utils/typography';
|
|
|
|
import LongPressIllustration from './long_press_illustration.svg';
|
|
|
|
type Props = {
|
|
containerStyle?: StyleProp<ViewStyle>;
|
|
message: string;
|
|
style?: StyleProp<ViewStyle>;
|
|
textStyles?: StyleProp<TextStyle>;
|
|
}
|
|
|
|
const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => ({
|
|
container: {
|
|
...StyleSheet.absoluteFillObject,
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
},
|
|
view: {
|
|
alignItems: 'center',
|
|
backgroundColor: theme.centerChannelBg,
|
|
borderRadius: 8,
|
|
height: 161,
|
|
padding: 16,
|
|
width: 247,
|
|
},
|
|
text: {
|
|
...typography('Heading', 200),
|
|
color: theme.centerChannelColor,
|
|
marginTop: 8,
|
|
paddingHorizontal: 12,
|
|
textAlign: 'center',
|
|
},
|
|
}));
|
|
|
|
const TutorialSwipeLeft = ({containerStyle, message, style, textStyles}: Props) => {
|
|
const theme = useTheme();
|
|
const styles = getStyleSheet(theme);
|
|
|
|
return (
|
|
<View
|
|
pointerEvents='none'
|
|
style={[styles.container, containerStyle]}
|
|
>
|
|
<View style={[styles.view, style]}>
|
|
<LongPressIllustration/>
|
|
<Text style={[styles.text, textStyles]}>
|
|
{message}
|
|
</Text>
|
|
</View>
|
|
</View>
|
|
);
|
|
};
|
|
|
|
export default TutorialSwipeLeft;
|