mirror of
https://github.com/Unleash/unleash.git
synced 2026-01-05 20:06:22 +01:00
feat: dynamic text field length milestone time (#11129)
This commit is contained in:
parent
4aba7d24a2
commit
36e40e6520
@ -13,10 +13,6 @@ const StyledInputGroup = styled('div')(({ theme }) => ({
|
||||
gap: theme.spacing(1),
|
||||
}));
|
||||
|
||||
const StyledTextField = styled(TextField)(({ theme }) => ({
|
||||
width: '60px',
|
||||
}));
|
||||
|
||||
const StyledSelect = styled(Select)(({ theme }) => ({
|
||||
width: '100px',
|
||||
}));
|
||||
@ -51,7 +47,7 @@ export const MilestoneProgressionTimeInput = ({
|
||||
}: IMilestoneProgressionTimeInputProps) => {
|
||||
return (
|
||||
<StyledInputGroup>
|
||||
<StyledTextField
|
||||
<TextField
|
||||
type='number'
|
||||
value={timeValue}
|
||||
onChange={onTimeValueChange}
|
||||
@ -61,6 +57,10 @@ export const MilestoneProgressionTimeInput = ({
|
||||
'aria-label': 'Time duration value',
|
||||
'aria-describedby': 'time-unit-select',
|
||||
}}
|
||||
sx={{
|
||||
width: `max(60px, ${String(timeValue).length + 8}ch)`,
|
||||
maxWidth: '300px',
|
||||
}}
|
||||
size='small'
|
||||
disabled={disabled}
|
||||
/>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user