mirror of
https://github.com/SomboChea/ui
synced 2024-05-21 02:41:36 +07:00
ae73772a37
* refactor: added eslint-plugin-import * refactor: disable some rules for muiComponents * fix: fixed import
21 lines
549 B
TypeScript
21 lines
549 B
TypeScript
import React, { forwardRef } from 'react';
|
|
import { default as MaterialUITextField, TextFieldProps } from '@material-ui/core/TextField';
|
|
|
|
// The default element type of MUI's TextField is 'div'
|
|
type TextFieldRef = HTMLElementTagNameMap['div'];
|
|
|
|
const TextField = forwardRef<TextFieldRef, TextFieldProps>(function ToolTip({ InputProps, classes, ...props }, ref) {
|
|
return (
|
|
<MaterialUITextField
|
|
{...props}
|
|
innerRef={ref}
|
|
InputProps={{
|
|
...InputProps,
|
|
classes,
|
|
}}
|
|
/>
|
|
);
|
|
});
|
|
|
|
export default TextField;
|