feat: stack limit options vertically

This commit is contained in:
karishmas6
2024-09-08 14:08:42 +05:30
parent 4d54fe9970
commit 493c3f5a25

View File

@@ -255,33 +255,42 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
</Box> </Box>
)} )}
{showLimitOptions && ( {showLimitOptions && (
<FormControl> <FormControl>
<FormLabel> <FormLabel>
<h4>What is the maximum number of rows you want to extract?</h4> <h4>What is the maximum number of rows you want to extract?</h4>
</FormLabel> </FormLabel>
<RadioGroup row value={limitType} onChange={(e) => updateLimitType(e.target.value as LimitType)} sx={{ width: '500px' }}> <RadioGroup
<FormControlLabel value="10" control={<Radio />} label="10" /> value={limitType}
<FormControlLabel value="100" control={<Radio />} label="100" /> onChange={(e) => updateLimitType(e.target.value as LimitType)}
<FormControlLabel value="custom" control={<Radio />} label="Custom" /> sx={{
{limitType === 'custom' && ( display: 'flex',
<TextField flexDirection: 'column',
type="number" width: '500px'
value={customLimit} }}
onChange={(e) => updateCustomLimit(e.target.value)} >
placeholder="Enter number" <FormControlLabel value="10" control={<Radio />} label="10" />
sx={{ <FormControlLabel value="100" control={<Radio />} label="100" />
marginLeft: '10px', <div style={{ display: 'flex', alignItems: 'center' }}>
marginTop: '-3px', <FormControlLabel value="custom" control={<Radio />} label="Custom" />
'& input': { {limitType === 'custom' && (
padding: '10px', <TextField
}, type="number"
}} value={customLimit}
/> onChange={(e) => updateCustomLimit(e.target.value)}
)} placeholder="Enter number"
</RadioGroup> sx={{
</FormControl> marginLeft: '10px',
'& input': {
padding: '10px',
},
}}
/>
)} )}
</div>
</RadioGroup>
</FormControl>
)}
{!getText && !getScreenshot && !getList && <Button variant="contained" onClick={startGetText}>Capture Text</Button>} {!getText && !getScreenshot && !getList && <Button variant="contained" onClick={startGetText}>Capture Text</Button>}
{getText && {getText &&
<> <>