Class: Shadcn::Breadcrumb::Ellipsis::Component

Inherits:
ApplicationViewComponent show all
Defined in:
app/components/shadcn/breadcrumb/ellipsis/component.rb

Overview

BreadcrumbEllipsis — collapsed crumbs.

Constant Summary

Constants inherited from ApplicationViewComponent

ApplicationViewComponent::CONTENTS_STYLE, ApplicationViewComponent::VOID_TAGS

Instance Attribute Summary

Attributes inherited from ApplicationViewComponent

#attributes

Instance Method Summary collapse

Methods inherited from ApplicationViewComponent

#css_classes, default_tag, #initialize, #merged_style, #render_element, #shadcn_t, slot_name, #style_variants, #tag_name

Constructor Details

This class inherits a constructor from Shadcn::ApplicationViewComponent

Instance Method Details

#callObject



19
20
21
22
23
24
# File 'app/components/shadcn/breadcrumb/ellipsis/component.rb', line 19

def call
  render_element(body: safe_join([
    render(Icon::Component.new("more-horizontal", class: "size-4")),
    tag.span(shadcn_t("breadcrumb.more"), class: "sr-only")
  ]))
end

#element_attributes(**defaults) ⇒ Object



15
16
17
# File 'app/components/shadcn/breadcrumb/ellipsis/component.rb', line 15

def element_attributes(**defaults)
  super(**{ role: "presentation", "aria-hidden" => "true" }.merge(defaults))
end