New property "count"

old
Javi Jimenez Villar 2015-06-24 16:46:17 +07:00
parent b45f0c09c6
commit f40ace6659
2 changed files with 7 additions and 4 deletions

View File

@ -12,6 +12,7 @@ module.exports = React.createClass
route : React.PropTypes.array
icon : React.PropTypes.string
caption : React.PropTypes.string
count : React.PropTypes.number
style : React.PropTypes.string
onClick : React.PropTypes.func
@ -28,4 +29,5 @@ module.exports = React.createClass
data-flex="horizontal center">
{ <FontIcon value={@props.icon} /> if @props.icon }
{ <abbr>{@props.caption}</abbr> if @props.caption }
{ <small>{@props.count}</small> if @props.count and parseInt(@props.count) isnt 0}
</a>

View File

@ -1,5 +1,3 @@
@import "../constants.styl"
[data-component-link]
position : relative
overflow : hidden
@ -15,8 +13,11 @@
// -- Children
> *
vertical-align : middle
> abbr
text-transform : Capitalize
> .icon
margin-right : (SPACE / 2)
font-size : FONT_SIZE_BIG
> abbr
text-transform : Capitalize
> small
font-size : FONT_SIZE_TINY
text-align : center