@wulperstudio/cms
Version:
Wulper Studio Library Components CMS
56 lines • 1.79 kB
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["textFieldProps"];
import React from 'react';
import { InputLabel, Stack, Box } from '@mui/material';
import { CssTextField, Span } from './styled';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
var TextFieldV5 = function TextFieldV5(_ref) {
var textFieldProps = _ref.textFieldProps,
props = _objectWithoutProperties(_ref, _excluded);
return /*#__PURE__*/_jsxs(Box, {
sx: {
my: 3
},
children: [props.labelRight ? /*#__PURE__*/_jsxs(Stack, {
direction: "row",
justifyContent: "space-between",
children: [/*#__PURE__*/_jsx(InputLabel, {
htmlFor: props.id,
sx: {
marginBottom: '5px',
fontSize: '14px',
fontWeight: 'bold',
fontFamily: 'Poppins, cursive',
color: props.colorLabel
},
children: props.label
}), /*#__PURE__*/_jsx(Span, {
onClick: function onClick() {
return props.toLink && props.toLink();
},
children: props.textLabelRight
})]
}) : /*#__PURE__*/_jsx(InputLabel, {
htmlFor: props.id,
sx: {
marginBottom: '5px',
fontSize: '14px',
fontWeight: 'bold',
fontFamily: 'Poppins, cursive',
color: props.colorLabel
},
children: props.label
}), /*#__PURE__*/_jsx(CssTextField, _extends({
borderColor: props.borderColor,
fullWidth: true,
id: props.id,
sx: {
backgroundColor: props.backgroundColor || '#F6F7FC',
borderRadius: '10px'
},
variant: "outlined"
}, textFieldProps))]
});
};
export default TextFieldV5;