-
Notifications
You must be signed in to change notification settings - Fork 5k
Expand file tree
/
Copy pathindex.jsx
More file actions
42 lines (31 loc) · 1.17 KB
/
index.jsx
File metadata and controls
42 lines (31 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
=========================================================
* Material Dashboard 2 React - v2.2.0
=========================================================
* Product Page: https://www.creative-tim.com/product/material-dashboard-react
* Copyright 2023 Creative Tim (https://www.creative-tim.com)
Coded by www.creative-tim.com
=========================================================
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*/
import { forwardRef } from "react";
// prop-types is a library for typechecking of props
import PropTypes from "prop-types";
// Custom styles for MDInput
import MDInputRoot from "components/MDInput/MDInputRoot";
const MDInput = forwardRef(({ error, success, disabled, ...rest }, ref) => (
<MDInputRoot {...rest} ref={ref} ownerState={{ error, success, disabled }} />
));
// Setting default values for the props of MDInput
MDInput.defaultProps = {
error: false,
success: false,
disabled: false,
};
// Typechecking props for the MDInput
MDInput.propTypes = {
error: PropTypes.bool,
success: PropTypes.bool,
disabled: PropTypes.bool,
};
export default MDInput;