twreporter-react-index-page
Version:
twreporter index page version 2
27 lines (20 loc) • 1.19 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _styledComponents = require('styled-components');
var _styledComponents2 = _interopRequireDefault(_styledComponents);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var TruncatText = _styledComponents2.default.div.withConfig({
displayName: 'truncat-text__TruncatText',
componentId: 'vknlqm-0'
})(['overflow: hidden;position: relative;line-height: ', ';max-height: ', ';text-align: justify;margin-right: -1em;padding-right: 1em;&::before {content: \'\u2026\';position: absolute;right: 0;bottom: 0;} &::after {content: \'\';position: absolute;right: 0;width: 1em;height: 1em;background-color: ', ';}'], function (props) {
return props.lineHeight;
}, function (props) {
var lineHeight = props.lineHeight,
lines = props.lines;
return lineHeight * lines + 'em';
}, function (props) {
return props.backgroundColor;
});
exports.default = TruncatText;