New property "count"
parent
b45f0c09c6
commit
f40ace6659
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue