import React from 'react'; import { Box, Button, Column, Icon, Popover, Row, Text, useBreakpointValue } from 'native-base'; import { Ionicons } from '@expo/vector-icons'; import { ElementProps } from './ElementTypes'; import { getElementDropdownNode, getElementTextNode, getElementToggleNode, getElementRangeNode, } from './ElementTypes'; import { ArrowDown2 } from 'iconsax-react-native'; import { useWindowDimensions } from 'react-native'; import useColorScheme from '../../hooks/colorScheme'; type RawElementProps = { element: ElementProps; }; export const RawElement = ({ element }: RawElementProps) => { const { title, icon, type, helperText, description, disabled, data } = element; const screenSize = useBreakpointValue({ base: 'small', md: 'big' }); const isSmallScreen = screenSize === 'small'; const { width: screenWidth } = useWindowDimensions(); const colorScheme = useColorScheme(); const color = colorScheme === 'light' ? 'rgba(0,0,0,0.7)' : 'rgba(255,255,255,0.7)' return ( {icon} {title} {description && ( {description} )} {helperText && ( (