2015-07-18 06:57:52 +03:00
|
|
|
###
|
|
|
|
@todo
|
|
|
|
###
|
|
|
|
|
|
|
|
Card = require '../../components/card'
|
|
|
|
|
|
|
|
module.exports = React.createClass
|
|
|
|
|
|
|
|
# -- States & Properties
|
|
|
|
|
|
|
|
# -- Events
|
|
|
|
onClick: (event, card) ->
|
|
|
|
console.log "onClick", arguments
|
|
|
|
|
|
|
|
onActionClick: ->
|
|
|
|
console.log "onClick", arguments
|
|
|
|
|
|
|
|
# -- Render
|
|
|
|
render: ->
|
|
|
|
actions = [
|
|
|
|
caption: "Save", icon: "add", onClick: @onActionClick
|
|
|
|
,
|
|
|
|
caption: "Close", onClick: @onActionClick
|
|
|
|
]
|
|
|
|
text = "Lorem Ipsum is simply dummy text of the printing and typesetting industry."
|
|
|
|
legend = "Lorem Ipsum is simply dummy text"
|
|
|
|
<section>
|
2015-07-18 07:00:45 +03:00
|
|
|
<h2>Cards</h2>
|
|
|
|
|
2015-07-18 06:57:52 +03:00
|
|
|
<h3>Basic properties</h3>
|
|
|
|
<Card title="Default Card" />
|
2015-07-23 05:38:32 +03:00
|
|
|
<Card title="Default Card loading" loading />
|
2015-07-18 06:57:52 +03:00
|
|
|
<Card title="Default Card with text" text={text} />
|
|
|
|
<Card title="Default Card with legend" legend={legend} />
|
|
|
|
<Card title="Default Card with actions" actions={actions} />
|
2015-07-18 07:00:45 +03:00
|
|
|
<Card title="Defaulr Card with text & image" text={text}
|
2015-07-18 06:57:52 +03:00
|
|
|
image="http://cdn.tapquo.com/photos/soyjavi.jpg" />
|
2015-07-18 07:00:45 +03:00
|
|
|
<Card title="Default Card with text, color & onClick event" text={text}
|
|
|
|
color="#e91e63" onClick={@onClick} />
|
2015-07-23 05:38:32 +03:00
|
|
|
<Card title="Default Card loading with text, color & onClick event"
|
|
|
|
text={text} color="#e91e63" onClick={@onClick} loading />
|
|
|
|
|
2015-07-18 06:57:52 +03:00
|
|
|
|
|
|
|
<h3>Sizes using type property</h3>
|
2015-07-18 07:00:45 +03:00
|
|
|
<Card type="small" title="Small Card with text & onClick event"
|
|
|
|
text={text} color="#00bcd4" onClick={@onClick} />
|
|
|
|
<Card type="square" title="Square Card with text & onClick event"
|
|
|
|
text={text} color="#00bcd4" onClick={@onClick} />
|
|
|
|
<Card type="wide" title="Wide card with text & onClick event"
|
|
|
|
text={text} color="#00bcd4" onClick={@onClick} />
|
2015-07-18 06:57:52 +03:00
|
|
|
|
|
|
|
</section>
|