Skip to content

Commit 9f7ed5c

Browse files
sai6855michaldudak
authored andcommitted
add test for mui#33339
1 parent 9bc4a02 commit 9f7ed5c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/mui-material/src/TextField/TextField.spec.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import * as React from 'react';
22
import TextField from '@mui/material/TextField';
33
import { expectType } from '@mui/types';
4+
import Typography from '@mui/material/Typography';
5+
import { FormHelperTextProps } from '@mui/material/FormHelperText';
46

57
{
68
// https://github.com/mui/material-ui/issues/12999
@@ -92,3 +94,17 @@ function FocusHandlerTest() {
9294

9395
return null;
9496
}
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

Comments
 (0)