Class: Shoelace::Components::SlColorPicker
- Inherits:
-
ActionView::Helpers::Tags::ColorField
- Object
- ActionView::Helpers::Tags::ColorField
- Shoelace::Components::SlColorPicker
- Includes:
- ErrorWrappable
- Defined in:
- app/helpers/shoelace/components/sl_color_picker.rb
Overview
:nodoc:
Constant Summary collapse
- RGB_VALUE_REGEX =
/#[0-9a-fA-F]{6}/.freeze
Instance Method Summary collapse
Methods included from ErrorWrappable
Instance Method Details
#field_type ⇒ Object
12 |
# File 'app/helpers/shoelace/components/sl_color_picker.rb', line 12 def field_type; nil; end |
#render ⇒ Object
18 19 20 21 |
# File 'app/helpers/shoelace/components/sl_color_picker.rb', line 18 def render @options["invalid"] = @options["data-invalid"] = "" if object_has_errors? super end |
#tag(tag_name, *args, &block) ⇒ Object
14 15 16 |
# File 'app/helpers/shoelace/components/sl_color_picker.rb', line 14 def tag(tag_name, *args, &block) tag_name.to_s == 'input' ? content_tag('sl-color-picker', '', *args, &block) : super end |