Files
ember-panda/addon/components/value-type-display.coffee
T

35 lines
952 B
CoffeeScript

import Ember from 'ember'
export default Ember.Component.extend
tagName: 'span'
type: null
classNames: ['value-type-display']
classNameBindings: ['typeClass']
typeClass: Ember.computed 'type', -> @get('type') || 'no-typ'
iconClass: Ember.computed 'type', ->
switch @get('type')
when 'boolean' then 'check square outline'
when 'date' then 'calendar alternate outline'
when 'select' then 'list'
when 'string' then 'terminal'
when 'text' then 'sticky note outline'
when 'number' then 'hashtag'
when 'timestamp' then 'clock outline'
else 'red warning circle'
# &.date
# @extend .fa-calendar
# &.number
# @extend .fa-hashtag
# &.select
# @extend .fa-list-ul
# &.string
# @extend .fa-terminal
# &.text
# @extend .fa-sticky-note-o
# &.window_from
# @extend .fa-clock-o
# &.window_to
# @extend .fa-clock-o
# &.timestamp
# @extend .fa-clock-o