clean up raw svg. give up on dark theme switcher. ready for another release.
This commit is contained in:
@ -9,7 +9,7 @@ import ProductList from "./ProductList";
|
||||
import convert, { Length } from "convert";
|
||||
import PercentDamage from "./PercentDamange";
|
||||
import MeasurementUnitInput from "./MeasurementUnitInput";
|
||||
|
||||
import UnitChooser from "./UnitChooser";
|
||||
|
||||
export default function ProductCalculatorSelector() {
|
||||
const [activeProduct, setActiveProduct] = useState(null as Product | null);
|
||||
@ -79,19 +79,27 @@ export default function ProductCalculatorSelector() {
|
||||
<View style={styles.inputWrapper}>
|
||||
{activeProduct ? (
|
||||
"w" in activeProduct.dimensions ? (
|
||||
<AreaInput
|
||||
defaultValue={activeProduct.dimensions}
|
||||
onMeasurementSet={onMeasurementSet}
|
||||
widthLabel="enter width"
|
||||
lengthLabel="enter length"
|
||||
units={measurement.u}
|
||||
/>
|
||||
<View style={{flex: 1, flexDirection: "row"}}>
|
||||
<AreaInput
|
||||
defaultValue={activeProduct.dimensions}
|
||||
onMeasurementSet={onMeasurementSet}
|
||||
widthLabel="enter width"
|
||||
lengthLabel="enter length"
|
||||
units={measurement.u}
|
||||
/>
|
||||
<UnitChooser
|
||||
choices={["in", "ft"]}
|
||||
onUnitSet={onUnitChosen}
|
||||
defaultUnit={activeProduct.dimensions.u}
|
||||
/>
|
||||
</View>
|
||||
) : (
|
||||
<MeasurementUnitInput
|
||||
defaultValue={activeProduct.dimensions.l}
|
||||
onValueSet={onLengthSet}
|
||||
onUnitSet={onUnitChosen}
|
||||
defaultUnit={activeProduct.dimensions.u}
|
||||
unitChoices={["ft", "in"]}
|
||||
/>
|
||||
)
|
||||
) : (
|
||||
|
Reference in New Issue
Block a user