1
0
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:
Mateusz Kwasniewski 2025-12-11 15:59:27 +01:00 committed by GitHub
parent 4aba7d24a2
commit 36e40e6520
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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}
/>