Sha256: e10b50e060a150e930f5ee36a832c8dc6f0180f83164082b02f39a686b869a0f

Contents?: true

Size: 1.16 KB

Versions: 6

Compression:

Stored size: 1.16 KB

Contents

require_relative '../helpers/indented_grid'

Voom::Presenters.define(:number_fields) do
  helpers Demo::Helpers::IndentedGrid
  attach :top_nav
  attach :component_drawer
  page_title 'Number Fields'

  indented_grid do

    title 'Basic'
    number_field name: :text do
      label 'Enter a number'
      hint 'Enter text or scroll to your desired number'
    end
    blank

    title 'Min/Max/Step'
    number_field name: :min_max, min: 0, max: 100, step: 5 do
      label 'Min/Max/Step'
      hint 'Arrows will step in increments of 5'
    end
    blank

    title 'Decimals'
    number_field name: :decimal, min: 1.0, max: 100, step: 0.01 do
      label 'Decimal'
      hint 'Arrows will step in increments of .01'
    end
    blank

    title 'With Leading Icon'
    number_field name: :amount do
      label 'Amount'
      icon :attach_money, position: :left
    end

    title 'With Trailing Icon'
    number_field name: :amount2 do
      label 'Amount'
      icon :attach_money, position: :right
    end
    blank

    title 'Read Only'
    number_field name: :readonly, readonly: true do
      label 'Amount'
      value '500'
    end

    attach :code, file: __FILE__
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
voom-presenters-2.1.2 app/demo/components/number_fields.pom
voom-presenters-2.1.0 app/demo/components/number_fields.pom
voom-presenters-2.0.3 app/demo/components/number_fields.pom
voom-presenters-2.0.2 app/demo/components/number_fields.pom
voom-presenters-2.0.1 app/demo/components/number_fields.pom
voom-presenters-2.0.0 app/demo/components/number_fields.pom