/
psyhack
/
chat-app
Обзор
Документация
Войти
/
psyhack
/
chat-app
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/components/DialogsScreen/SupportBanner.js
47 строк
1 KB
sanchine
load project
19 июн 2024, 16:50
Не верифицирован
19 июн 2024, 16:50
3b45049
Код
Авторство
О чём код?
import React from "react"; import { View, Text, StyleSheet, Image, TouchableOpacity } from "react-native"; import SupportBannerAvatar from '../../../assets/DialogsScreen/support_banner_avatar.png' import { DIALOG_SUPPORT_BANNER_LABEL, DIALOG_SUPPORT_BANNER_DESCRIPTION } from "../../strings"; export const SupportBanner = ({ onOpen }) => { return ( <TouchableOpacity style={styles.banner} activeOpacity={0.7} onPress={onOpen}> <View style={styles.content}> <Image source={SupportBannerAvatar} /> <View style={styles.textBlock}> <Text style={styles.label}>{ DIALOG_SUPPORT_BANNER_LABEL }</Text> <Text style={styles.description}>{ DIALOG_SUPPORT_BANNER_DESCRIPTION }</Text> </View> </View> </TouchableOpacity> ) } const styles = StyleSheet.create({ banner: { paddingHorizontal: 8, marginBottom: 12, // backgroundColor: 'red' }, content: { flexDirection: 'row', padding: 10, backgroundColor: "#F3E5FF", }, textBlock: { paddingLeft: 12, flexDirection: "column", alignItems: "flex-start" }, label: { fontFamily: "segoe-ui-bold", fontSize: 14, fontWeight: 700, height: 24, }, description: { fontFamily: "segoe-ui", fontSize: 14, fontWeight: 400 } })