UNPKG

@wulperstudio/cms

Version:
31 lines (30 loc) 1.52 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _react = _interopRequireDefault(require("react")); var _styled = require("./styled"); var _jsxRuntime = require("react/jsx-runtime"); var Text = function Text(props) { var _props$typographyProp, _props$typographyProp2, _props$typographyProp3, _props$typographyProp4; return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styled.Box, { showBorder: props.showBorder, backgroundColor: props.backgroundColor, showBoxShadow: props.showBoxShadow, showDivider: props.showDivider, children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styled.Label, { children: props.label }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styled.CustomTypography, Object.assign({}, props.typographyProps, { fontSize: ((_props$typographyProp = props.typographyProps) == null ? void 0 : _props$typographyProp.fontSize) || '16px', lineHeight: 1.5, fontWeight: ((_props$typographyProp2 = props.typographyProps) == null ? void 0 : _props$typographyProp2.fontWeight) || 700, color: ((_props$typographyProp3 = props.typographyProps) == null ? void 0 : _props$typographyProp3.color) || '#223263', variant: ((_props$typographyProp4 = props.typographyProps) == null ? void 0 : _props$typographyProp4.variant) || 'body2', clines: 1, children: props.text }))] }); }; var _default = exports["default"] = Text;