Class: Coco::App::SidebarNav::Navbar
- Includes:
- Coco::AppComponentsHelper
- Defined in:
- app/components/coco/app/sidebar_nav/navbar/navbar.rb
Constant Summary
Constants included from Concerns::AcceptsTagAttributes
Concerns::AcceptsTagAttributes::TAG_ATTRIBUTE_NAMES
Instance Attribute Summary collapse
-
#actions_data ⇒ Object
readonly
Returns the value of attribute actions_data.
Instance Method Summary collapse
-
#initialize ⇒ Navbar
constructor
A new instance of Navbar.
- #nav_item(mobile: true, &block) ⇒ Object
- #with_link ⇒ Object
- #with_menu ⇒ Object
Methods included from Coco::AppComponentsHelper
#coco_app_header, #coco_app_layout, #coco_contact_callout, #coco_faqs, #coco_plan_card, #coco_plan_picker, #coco_sidebar_nav, #coco_sidebar_nav_menu
Methods inherited from Component
#accepts_options?, after_initialize, before_initialize, before_render, new
Methods included from Coco::AlpineHelper
Methods included from TagHelper
#prefix_attr_keys, #random_id, #style_str
Methods included from CoreComponentsHelper
#coco_avatar, #coco_badge, #coco_button, #coco_button_group, #coco_button_to, #coco_color_picker_button, #coco_component, #coco_confirm_button, #coco_embed, #coco_fields, #coco_form_for, #coco_form_with, #coco_icon, #coco_image, #coco_image_picker_button, #coco_layout_picker_button, #coco_link, #coco_link_to, #coco_menu_button, #coco_menu_item, #coco_modal, #coco_modal_dialog, #coco_modal_lightbox, #coco_notice, #coco_option_bar, #coco_page, #coco_pager_button, #coco_panel, #coco_placeholder, #coco_prose, #coco_seamless_textarea, #coco_snackbar, #coco_spacer, #coco_stack, #coco_stamp, #coco_svg, #coco_system_banner, #coco_tag, #coco_toast, #coco_toolbar, #resolve_component
Methods included from Concerns::Translatable
Methods included from Concerns::HasName
Methods included from Concerns::AcceptsTagAttributes
Constructor Details
#initialize ⇒ Navbar
Returns a new instance of Navbar.
31 32 33 34 |
# File 'app/components/coco/app/sidebar_nav/navbar/navbar.rb', line 31 def initialize(**) @actions_data = [] @menus_data = {} end |
Instance Attribute Details
#actions_data ⇒ Object (readonly)
Returns the value of attribute actions_data.
29 30 31 |
# File 'app/components/coco/app/sidebar_nav/navbar/navbar.rb', line 29 def actions_data @actions_data end |
Instance Method Details
#nav_item(mobile: true, &block) ⇒ Object
36 37 38 |
# File 'app/components/coco/app/sidebar_nav/navbar/navbar.rb', line 36 def nav_item(mobile: true, &block) tag.div(class: "nav-item", data: {show_on_mobile: mobile.to_s}, &block) end |
#with_link ⇒ Object
40 41 42 |
# File 'app/components/coco/app/sidebar_nav/navbar/navbar.rb', line 40 def with_link(...) with_item_link(...) end |
#with_menu ⇒ Object
44 45 46 |
# File 'app/components/coco/app/sidebar_nav/navbar/navbar.rb', line 44 def (...) (...) end |