function _templateObject() { var data = _taggedTemplateLiteral(["\n margin: 0;\n line-height: ", ";\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n text-transform: ", ";\n ", "\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } import styled from 'styled-components'; import PropTypes from 'prop-types'; import colors from '../../theme/colors'; var Text = styled.p(_templateObject(), function (_ref) { var lineHeight = _ref.lineHeight; return lineHeight; }, function (_ref2) { var theme = _ref2.theme, color = _ref2.color; return theme.main.colors[color] || color; }, function (_ref3) { var theme = _ref3.theme, fontSize = _ref3.fontSize; return theme.main.sizes.fonts[fontSize]; }, function (_ref4) { var theme = _ref4.theme, fontWeight = _ref4.fontWeight; return theme.main.fontWeights[fontWeight]; }, function (_ref5) { var textTransform = _ref5.textTransform; return textTransform; }, function (_ref6) { var ellipsis = _ref6.ellipsis; return ellipsis && "\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n "; }); Text.defaultProps = { color: 'greyDark', ellipsis: false, fontSize: 'md', fontWeight: 'regular', lineHeight: 'normal', textTransform: 'none', // TODO : This is temporary theme: { main: { colors: colors, sizes: { fonts: { xs: '11px', sm: '12px', md: '13px', lg: '18px', xl: '24px' } }, fontWeights: { regular: 400, semiBold: 500, bold: 600, black: 900 } } } }; Text.propTypes = { color: PropTypes.string, ellipsis: PropTypes.bool, fontSize: PropTypes.string, fontWeight: PropTypes.string, lineHeight: PropTypes.string, textTransform: PropTypes.string, // eslint-disable-next-line react/forbid-prop-types theme: PropTypes.object }; export default Text;