feat: render text field if selected option custom

This commit is contained in:
karishmas6
2024-08-29 23:03:47 +05:30
parent 553c977870
commit a8248ae1b0

View File

@@ -190,15 +190,15 @@ export const InterpretationLog = () => {
<FormControlLabel value="10" control={<Radio />} label="10" />
<FormControlLabel value="100" control={<Radio />} label="100" />
<FormControlLabel value="custom" control={<Radio />} label="Custom" />
{customValue && (
<input
type="number"
value={customValue}
onChange={{}}
placeholder="Enter custom value"
style={{ marginLeft: 10 }}
/>
)}
{selectedOption === 'custom' && (
                        <TextField
                          type="number"
                          value={customValue}
                          onChange={handleCustomValueChange}
                          placeholder="Enter number"
                          sx={{ marginLeft: '10px', marginTop: '10px', color: 'white' }}
                        />
                      )}
</RadioGroup>
</FormControl>