UNPKG

ldx-widgets

Version:

widgets

45 lines (37 loc) 1.01 kB
(function() { var PvrInfoItem, React, div; React = require('react'); div = React.DOM.div; /* Popover Content, see pvr_wrapper.coffee for docs */ PvrInfoItem = React.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 = React.createFactory(PvrInfoItem); }).call(this);