Class: SelectPreview

Inherits:
Lookbook::Preview
  • Object
show all
Defined in:
lib/lookbook/select_preview.rb

Instance Method Summary collapse

Instance Method Details

#default(label: 'Select', disabled: false, required: false) ⇒ Object

Parameters:

  • label (defaults to: 'Select')

    text

  • disabled (defaults to: false)

    toggle

  • required (defaults to: false)

    toggle



6
7
8
9
10
11
12
# File 'lib/lookbook/select_preview.rb', line 6

def default(label: 'Select', disabled: false, required: false)
  render 'common/form', helper_name: 'material_select', label: label, name: 'checkbox', id: 'Input', disabled: disabled, required: required, options: [
    { value: '', label: '-' },
    { value: 'on', label: 'On' },
    { value: 'off', label: 'Off' }
  ]
end