Sha256: ae4ff6e3018f561b0338524ea1b04087a8b3ebd10ec8917c4f620fb5ffa94f03

Contents?: true

Size: 994 Bytes

Versions: 26

Compression:

Stored size: 994 Bytes

Contents

Rev.registerMixin 'GridColumn',

    _gridColumnBooleanClassProps: [
      "end"
      "smallCentered"
      "mediumCentered"
      "largeCentered"
      "smallUncentered"
      "mediumUncentered"
      "largeUncentered"
    ]

    _gridColumnNumericClassProps: [
      "small"
      "smallOffset"
      "smallPush"
      "smallPull"
      "medium"
      "mediumOffset"
      "mediumPush"
      "mediumPull"
      "large"
      "largeOffset"
      "largePush"
      "largePull"
    ]

    _gridColumnRewriteClassName: (props) ->
      classes =
        columns: true

      for name in @_gridColumnBooleanClassProps
        classes[_.str.dasherize name] = @props[name]

      for name in @_gridColumnNumericClassProps
        classes["#{_.str.dasherize name}-#{@props[name]}"] = true if @props[name]?
        
      @props.className = @classAdd classes

    componentWillMount: -> @_gridColumnRewriteClassName @props
    componentWillReceiveProps: (props) -> @_gridColumnRewriteClassName props

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
revelry_core-0.1.9.1 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee
revelry_core-0.1.9.0 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee
revelry_core-0.1.8.6 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee
revelry_core-0.1.8.5 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee
revelry_core-0.1.8.4 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee
revelry_core-0.1.8.3 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee
revelry_core-0.1.8.2 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee
revelry_core-0.1.8.1 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee
revelry_core-0.1.8.0 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee
revelry_core-0.1.7.0 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee
revelry_core-0.1.6.8 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee
revelry_core-0.1.6.7 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee
revelry_core-0.1.6.6 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee
revelry_core-0.1.6.5 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee
revelry_core-0.1.6.4 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee
revelry_core-0.1.6.3 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee
revelry_core-0.1.6.2 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee
revelry_core-0.1.6.1 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee
revelry_core-0.1.5 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee
revelry_core-0.1.4 app/assets/javascripts/revelry/mixins/GridColumn.js.coffee