From f3b56c0e55494ce68ba1257689241c05612eca1c Mon Sep 17 00:00:00 2001 From: padamsen_fisker Date: Fri, 1 Mar 2024 14:44:57 -0500 Subject: [PATCH 1/2] CEC-5751 - Flashpack UI: Make a picklist for the ECU names --- src/components/Controls/ECUDropDown/index.jsx | 44 +- .../Add/__snapshots__/index.test.jsx.snap | 495 +++++++++++++++++- src/components/Flashpack/Add/index.jsx | 13 +- 3 files changed, 517 insertions(+), 35 deletions(-) diff --git a/src/components/Controls/ECUDropDown/index.jsx b/src/components/Controls/ECUDropDown/index.jsx index 0ed9188..d54e106 100644 --- a/src/components/Controls/ECUDropDown/index.jsx +++ b/src/components/Controls/ECUDropDown/index.jsx @@ -1,32 +1,52 @@ import React from "react"; -import { Select } from "@material-ui/core"; +import { FormControl, InputLabel, Select } from "@material-ui/core"; +import useStyles from "../../useStyles"; const ECUDropDown = (props) => { const changeHandler = (e) => { if (!props.changeHandler) return; props.changeHandler(e); }; + const classes = useStyles(); return ( - + + {props.label} + + + ); }; export default ECUDropDown; const ECUs = [ + null, ["AGS", "Active Grille Shutter"], ["ADB", "Adaptive Driving Beam"], ["ADAS", "Advanced Driver Assist System"], diff --git a/src/components/Flashpack/Add/__snapshots__/index.test.jsx.snap b/src/components/Flashpack/Add/__snapshots__/index.test.jsx.snap index 9487d26..36e887b 100644 --- a/src/components/Flashpack/Add/__snapshots__/index.test.jsx.snap +++ b/src/components/Flashpack/Add/__snapshots__/index.test.jsx.snap @@ -214,13 +214,11 @@ exports[`FlashpackAdd Render 1`] = ` class="input_container" >