Expose flex on TextInput

This commit is contained in:
Alex Holliday committed 2024-11-26 13:37:10 +08:00
1 parent 3bfdbf5a89
commit 2bfefcb080
1 file changed
+3 -1
@@ -77,6 +77,7 @@ const TextInput = forwardRef(
endAdornment = null, endAdornment = null,
label = null, label = null,
maxWidth = "100%", maxWidth = "100%",
flex,
disabled = false, disabled = false,
}, },
ref ref
@@ -84,7 +85,7 @@ const TextInput = forwardRef(
const [fieldType, setFieldType] = useState(type); const [fieldType, setFieldType] = useState(type);
const theme = useTheme(); const theme = useTheme();
return ( return (
<Stack> <Stack flex={flex}>
<Typography <Typography
component="h3" component="h3"
fontSize={"var(--env-var-font-size-medium)"} fontSize={"var(--env-var-font-size-medium)"}
@@ -141,6 +142,7 @@ TextInput.propTypes = {
endAdornment: PropTypes.node, endAdornment: PropTypes.node,
label: PropTypes.string, label: PropTypes.string,
maxWidth: PropTypes.string, maxWidth: PropTypes.string,
flex: PropTypes.number,
disabled: PropTypes.bool, disabled: PropTypes.bool,
}; };