Sha256: bb07eb27a1b9a94f1460f2258d339e8d55ed4dc360a9c8af1d96acf172592bec

Contents?: true

Size: 1.51 KB

Versions: 62

Compression:

Stored size: 1.51 KB

Contents

#color-picker-field.style-guide__subsection

  %h3= link_to_style_guide('components', 'color_picker_field')

  %p Color picker fields are available via the content block DSL. They use the browsers native color picker UI.

  .style-guide__example-block
    .property
      = label_tag 'color_picker_1', 'Color', class: 'property__name'
      .color-picker
        = color_field_tag 'color_picker_field', '#0060ff', id: 'color_picker_1', class: 'color-picker__input'

  %p Color pickers can accept an array of preset brand colors which are rendered when the user clicks the picker, along with a button allowing the user to open the browsers native color picker.

  .style-guide__example-block
    .property
      = label_tag 'color_picker_2', 'Color', class: 'property__name'
      .color-picker
        = color_field_tag 'color_picker_field', '#0060ff', id: 'color_picker_2', class: 'color-picker__input', list: 'color-picker-preset-list-id'
        - presets = ['#ffffff', '#000000', '#303541', '#0060ff', '#011eff']
        %datalist{ id: 'color-picker-preset-list-id' }
          - presets.each do |color|
            %option= color

  %p For browsers with no, default color picker support, a polyfill will be employed.

  .style-guide__example-block
    .property
      = label_tag 'color_picker_3', 'Color', class: 'property__name'
      .color-picker
        = text_field_tag 'color_picker_field', '#0060ff', id: 'color_picker_3', class: 'color-picker__input'

  :javascript
    $(function () {
      $('#color_picker_3').spectrum();
    });

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-admin-3.4.27 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml
workarea-admin-3.5.4 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml
workarea-admin-3.4.26 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml
workarea-admin-3.5.3 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml
workarea-admin-3.4.25 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml
workarea-admin-3.5.2 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml
workarea-admin-3.4.24 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml
workarea-admin-3.5.1 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml
workarea-admin-3.4.23 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml
workarea-admin-3.4.22 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml
workarea-admin-3.5.0 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml
workarea-admin-3.4.21 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml
workarea-admin-3.5.0.beta.1 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml
workarea-admin-3.4.20 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml
workarea-admin-3.4.19 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml
workarea-admin-3.4.18 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml
workarea-admin-3.4.17 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml
workarea-admin-3.4.16 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml
workarea-admin-3.4.15 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml
workarea-admin-3.4.14 app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml