ldx-widgets
Version:
widgets
38 lines (30 loc) • 716 B
text/coffeescript
React = require 'react'
{div} = React.DOM
###
Popover Content, see pvr_wrapper.coffee for docs
###
PvrInfoItem = React.createClass
displayName: 'PvrInfoItem'
render: ->
{item, itemHeight, hasSubLabel} = @props
className = 'plain-pvr-content-item'
lh = itemHeight/2
if hasSubLabel
className += ' has-sublabel'
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