import React from "react"; import Question, { QuestionChildProps } from "./Question"; import Slider from "../ui/Slider"; import Text from "../ui/Text"; import { View } from "react-native"; import SegmentedControl from "../ui/SegmentedControl"; export default React.forwardRef( (props, ref): React.ReactElement => { const MIN_WEIGHT = 40; const MAX_WEIGHT = 200; const UNITS = ["kg", "lb"]; const [weight, setWeight] = React.useState(MIN_WEIGHT); const [unit, setUnit] = React.useState("kg"); return ( {weight <= MIN_WEIGHT ? ( - de ) : null} {weight >= MAX_WEIGHT ? ( + de ) : null} {weight} {unit} ); } );