import React from 'react'; import { View, TouchableOpacity, Text } from 'react-native'; import { MaterialIcons } from '@expo/vector-icons'; import tw from '../lib/tailwind'; import { colors } from '../lib/theme-colors'; interface QuantifierProps { value: number; setValue: (value: number) => void; step?: number; unit?: string | { shortNotation: string }; min?: number; max?: number; } const Quantifier: React.FC = ({ value, setValue, step = 1, unit, min = 0, max }) => { const unitText = typeof unit === 'object' ? unit?.shortNotation : unit; return ( setValue(Math.max(min, value - step))} activeOpacity={0.7} > {value} {/* {unitText && ( //hide unit text for now {unitText} )} */} { if (max !== undefined && value + step > max) return; setValue(value + step); }} activeOpacity={0.7} > ); }; export default Quantifier;