UNPKG

@wulperstudio/cms

Version:
62 lines (61 loc) 2.13 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); var _react = _interopRequireDefault(require("react")); var _material = require("@mui/material"); var _styled = require("./styled"); var _jsxRuntime = require("react/jsx-runtime"); var _excluded = ["textFieldProps"]; var TextFieldV5 = function TextFieldV5(_ref) { var textFieldProps = _ref.textFieldProps, props = (0, _objectWithoutProperties2["default"])(_ref, _excluded); return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, { sx: { my: 3 }, children: [props.labelRight ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Stack, { direction: "row", justifyContent: "space-between", children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.InputLabel, { htmlFor: props.id, sx: { marginBottom: '5px', fontSize: '14px', fontWeight: 'bold', fontFamily: 'Poppins, cursive', color: props.colorLabel }, children: props.label }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styled.Span, { onClick: function onClick() { return props.toLink && props.toLink(); }, children: props.textLabelRight })] }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.InputLabel, { htmlFor: props.id, sx: { marginBottom: '5px', fontSize: '14px', fontWeight: 'bold', fontFamily: 'Poppins, cursive', color: props.colorLabel }, children: props.label }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styled.CssTextField, Object.assign({ borderColor: props.borderColor, fullWidth: true, id: props.id, sx: { backgroundColor: props.backgroundColor || '#F6F7FC', borderRadius: '10px' }, variant: "outlined" }, textFieldProps))] }); }; var _default = exports["default"] = TextFieldV5;