We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bc4a02 commit 9f7ed5cCopy full SHA for 9f7ed5c
packages/mui-material/src/TextField/TextField.spec.tsx
@@ -1,6 +1,8 @@
1
import * as React from 'react';
2
import TextField from '@mui/material/TextField';
3
import { expectType } from '@mui/types';
4
+import Typography from '@mui/material/Typography';
5
+import { FormHelperTextProps } from '@mui/material/FormHelperText';
6
7
{
8
// https://github.com/mui/material-ui/issues/12999
@@ -92,3 +94,17 @@ function FocusHandlerTest() {
92
94
93
95
return null;
96
}
97
+
98
+{
99
+ const HelperText = ({ children }: FormHelperTextProps) => (
100
+ <Typography component="h6">{children}</Typography>
101
+ );
102
103
+ <TextField
104
+ sx={{ mt: 4 }}
105
+ label="Enter some stuff"
106
+ defaultValue="Hello"
107
+ helperText="Hello, world!"
108
+ FormHelperTextProps={{ component: HelperText }}
109
+ />;
110
+}
0 commit comments