Module: Action::DropdownHelper
- Defined in:
- app/helpers/action/dropdown_helper.rb
Instance Method Summary collapse
- #action_dropdown_handle_component_params(axis_key:, align_key:) ⇒ Object
- #action_dropdown_handle_component_title(axis_key:, align_key:) ⇒ Object
Instance Method Details
#action_dropdown_handle_component_params(axis_key:, align_key:) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'app/helpers/action/dropdown_helper.rb', line 10 def action_dropdown_handle_component_params(axis_key:, align_key:) params = { axis: "#{axis_key}", align: "#{align_key}" } params.delete(:axis) if axis_key == "bottom" params.delete(:align) if align_key == "start" params.filter_map { |k, v| "#{k}: #{v.inspect}" }.join(", ") end |
#action_dropdown_handle_component_title(axis_key:, align_key:) ⇒ Object
5 6 7 8 |
# File 'app/helpers/action/dropdown_helper.rb', line 5 def action_dropdown_handle_component_title(axis_key:, align_key:) "# Dropdown #{axis_key} #{"(default)" if axis_key == "bottom"} / aligns to #{align_key} #{"(default)" if align_key == "start"} of button horizontally" end |