@roo-ui/components
Version:
48 lines (32 loc) • 1.94 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _styledComponents = require('styled-components');
var _styledComponents2 = _interopRequireDefault(_styledComponents);
var _cleanTag = require('clean-tag');
var _cleanTag2 = _interopRequireDefault(_cleanTag);
var _polished = require('polished');
var _styledSystem = require('styled-system');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var textDecoration = (0, _styledSystem.style)({
prop: 'textDecoration',
cssProperty: 'textDecoration'
});
var Text = (0, _styledComponents2.default)(_cleanTag2.default.span).withConfig({
displayName: 'Text'
})(['', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ''], _styledSystem.textStyle, _styledSystem.color, _styledSystem.fontSize, _styledSystem.fontWeight, _styledSystem.letterSpacing, _styledSystem.lineHeight, _styledSystem.space, _styledSystem.textAlign, textDecoration, function (props) {
return props.hidden && (0, _styledComponents.css)(['', ''], (0, _polished.hideVisually)());
});
Text.propTypes = _extends({}, _styledSystem.textStyle.propTypes, _styledSystem.color.propTypes, _styledSystem.fontSize.propTypes, _styledSystem.fontWeight.propTypes, _styledSystem.letterSpacing.propTypes, _styledSystem.lineHeight.propTypes, _styledSystem.space.propTypes, _styledSystem.textAlign.propTypes, textDecoration.propTypes, {
hidden: _propTypes2.default.bool
});
Text.defaultProps = {
hidden: false,
textStyle: 'text',
blacklist: Object.keys(Text.propTypes)
};
exports.default = Text;
;