Class: Coco::App::Elements::Button
- Extended by:
- BaseHelper
- Defined in:
- app/components/coco/app/elements/button/button.rb
Constant Summary collapse
- SIZES =
[:sm, :md, :lg, nil]
- SIZE_ALIASES =
{ default: [:sm, {xl: :md}] }
- THEMES =
[ "primary", "text-primary", "secondary", "text-secondary", "positive", "text-positive", "negative", "text-negative", "warning", "text-warning", "info", "text-info", "toolbar", "toolbar-floating", "text-toolbar", "neutral-dark", "neutral-light", "text-neutral-light", "text-neutral-dark", "blank", nil ]
- DEFAULT_THEME =
"primary"
Constants inherited from Button
Instance Attribute Summary
Attributes inherited from Button
#button_attrs, #on_click, #resize
Instance Method Summary collapse
Methods included from BaseHelper
coco_embed, coco_icon, coco_image, coco_link_to_modal, coco_modal, coco_modal_data_attributes, coco_modal_dialog, coco_modal_frame_id, coco_modal_lightbox, coco_placeholder, coco_svg, coco_tag
Methods inherited from Button
#active?, #alpine_data, #button?, #button_tag_name, #button_text, #component_classes, #confirm?, #disabled?, #dropdown?, #dropdown_opts, #icon_only?, #initialize, #link?, #loading?, #state_tooltips, #states, #toggle?, #toggle_direction
Methods included from Concerns::AcceptsOptions
#accepted_options, #get_option_group
Constructor Details
This class inherits a constructor from Coco::Button
Instance Method Details
#with_confirmation ⇒ Object
77 78 79 |
# File 'app/components/coco/app/elements/button/button.rb', line 77 def with_confirmation(...) with_dropdown_confirmation(...) end |
#with_dropdown ⇒ Object
73 74 75 |
# File 'app/components/coco/app/elements/button/button.rb', line 73 def with_dropdown(...) with_dropdown_content(...) end |