UNPKG

@ezform/mui

Version:

Material UI form components for use with EZForm React validation and form library

34 lines (33 loc) 1.18 kB
var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; import React from "react"; import { TextField, withStyles } from "@material-ui/core"; var StyledTextField = withStyles({ root: { "& label": { color: "#333", }, "& label.Mui-focused": { color: "#333", }, "& .MuiInput-underline:before": { borderBottomColor: "transparent", }, "& .MuiInput-underline:hover:before": { borderBottomColor: "transparent", }, "& .MuiInput-underline:after": { borderBottomColor: "transparent", }, }, })(TextField); export var FieldReadonly = function (props) { return React.createElement(StyledTextField, __assign({}, props, { variant: "standard", inputProps: { readOnly: true }, InputLabelProps: { shrink: true } })); };