import {Button, Text, View, StyleSheet, TouchableOpacity, Image, ScrollView, GestureResponderEvent} from "react-native"; import {useAppDispatch} from "../../redux/store"; import * as process from "process"; import {responsiveFontSize, responsiveHeight, responsiveWidth} from "react-native-responsive-dimensions"; import {background, blue, gray} from "../../css/colors"; import {RFPercentage} from "react-native-responsive-fontsize"; import DText from "../../components/DText/DText"; import DTitle from "../../components/DTitle/DTitle"; import {ScreenStackHeaderLeftView} from "react-native-screens"; import Separator from "../../components/Separator/Separator"; import {BottomSheetModal} from "@gorhom/bottom-sheet"; import {useMemo, useRef, useState} from "react"; import {openApp} from "rn-openapp"; import SelectProductModal from "../../components/Modals/SelectProductModal/SelectProductModal"; import selectProductModal from "../../components/Modals/SelectProductModal/SelectProductModal"; type SettingsElementProps = { icon: any; title: string; onPress?: (event: GestureResponderEvent) => void } const SettingsElement: React.FC = ({icon, title, onPress}) => { return ( {title} ) } type HistoryElementProps = { cost: number; description: string; color: string; } const HistoryElement: React.FC = ({cost, description, color}) => { const formatNumber = (n: number): string => n >= 0 ? `+${n}` : `${n}`; return ( {formatNumber(cost)} руб {description} ) } function ProfileScreen() { const bottomSheetModalRef = useRef(null); const snapPoints = useMemo(() => ['25%', '40%'], []); const [modalVisible, setModalVisible] = useState(false); return ( Ваш баланс: 228 руб Собрано товаров: 1337 шт { openApp('assemblrprintingservice'); }} icon={require('assets/icons/settings/printer.png')} title={'Принтеры'}/> История операций { setModalVisible(false); }} > хуй ) } const styles = StyleSheet.create({ container: { // backgroundColor: "red", flex: 1, display: "flex", flexDirection: "column", }, overlay: { ...StyleSheet.absoluteFillObject, // Это заполнит родительский элемент абсолютным позиционированием backgroundColor: 'rgba(104, 104, 104, 0.50)', zIndex: 2, // Значение zIndex больше, чем у content, поэтому overlay будет выше }, historyElementContainer: { width: "100%", backgroundColor: "white", borderRadius: RFPercentage(2), padding: RFPercentage(2), elevation: 1 }, historyContainer: { paddingVertical: responsiveHeight(2), flex: 1, // backgroundColor: "red" }, historyElements: { marginTop: responsiveHeight(3), }, historyElementsContainer: { rowGap: responsiveHeight(2), }, header: { backgroundColor: blue, borderBottomLeftRadius: RFPercentage(3), borderBottomRightRadius: RFPercentage(3), elevation: 10, paddingHorizontal: responsiveWidth(5), paddingVertical: responsiveHeight(3), color: "white", display: "flex", flexDirection: "row" }, headerText: { color: "white" }, headerInfo: { // backgroundColor: "red" }, actionsCarousel: { flexDirection: "row", columnGap: responsiveWidth(3), }, actionsCarouselContainer: { // backgroundColor: "red", paddingVertical: responsiveHeight(5) }, actionsCarouselImage: { resizeMode: "contain", flex: 1, width: "100%", height: "100%", }, actionsCarouselImageWrapper: { width: RFPercentage(10), height: RFPercentage(10), backgroundColor: "white", borderRadius: 100, borderWidth: RFPercentage(0.3), padding: RFPercentage(1), justifyContent: "center", alignItems: "center" }, actionsCarouselElementContainer: { display: "flex", alignItems: "center", }, content: { flex: 1, paddingHorizontal: responsiveWidth(5), }, }) export default ProfileScreen;