ldx-widgets
Version:
widgets
47 lines (38 loc) • 1.05 kB
JavaScript
(function() {
var PvrInfoItem, React, createClass, div;
React = require('react');
createClass = require('create-react-class');
div = React.DOM.div;
/*
Popover Content, see pvr_wrapper.coffee for docs
*/
PvrInfoItem = createClass({
displayName: 'PvrInfoItem',
render: function() {
var className, hasSubLabel, item, itemHeight, lh, ref;
ref = this.props, item = ref.item, itemHeight = ref.itemHeight, hasSubLabel = ref.hasSubLabel;
className = 'plain-pvr-content-item';
lh = itemHeight / 2;
if (hasSubLabel) {
className += ' has-sublabel';
}
return div({
className: className,
style: {
minHeight: itemHeight,
lineHeight: lh + "px"
}
}, [
div({
key: 'info',
className: 'pvr-info',
title: item.info
}, item.info), div({
key: 'label',
className: 'pvr-info-label'
}, item.label)
]);
}
});
module.exports = PvrInfoItem;
}).call(this);