Class: ShadcnPhlexcomponents::BreadcrumbSeparator

Inherits:
Base
  • Object
show all
Defined in:
lib/shadcn_phlexcomponents/components/breadcrumb.rb

Constant Summary

Constants inherited from Base

ShadcnPhlexcomponents::Base::SANITIZER_ALLOWED_ATTRIBUTES, ShadcnPhlexcomponents::Base::SANITIZER_ALLOWED_TAGS, ShadcnPhlexcomponents::Base::TAILWIND_MERGER

Instance Method Summary collapse

Methods inherited from Base

#before_template, #convert_collection_hash_to_struct, #find_as_child, #icon, #initialize, #item_disabled?, #merge_default_attributes, #merged_as_child_attributes, #nokogiri_attributes_to_hash, #overlay, #sanitize_as_child

Constructor Details

This class inherits a constructor from ShadcnPhlexcomponents::Base

Instance Method Details

#default_attributes ⇒ Object



119
120
121
122
123
124
125
126
# File 'lib/shadcn_phlexcomponents/components/breadcrumb.rb', line 119

def default_attributes
  {
    role: "presentation",
    aria: {
      hidden: "true",
    },
  }
end

#view_template ⇒ Object



128
129
130
131
132
133
134
135
136
# File 'lib/shadcn_phlexcomponents/components/breadcrumb.rb', line 128

def view_template(&)
  li(**@attributes) do
    if block_given?
      yield
    else
      icon("chevron-right")
    end
  end
end