Class: ShadcnPhlexcomponents::BreadcrumbLink
- 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
-
#initialize(name = nil, options = nil, html_options = nil) ⇒ BreadcrumbLink
constructor
A new instance of BreadcrumbLink.
- #view_template ⇒ Object
Methods inherited from Base
#before_template, #convert_collection_hash_to_struct, #default_attributes, #find_as_child, #icon, #item_disabled?, #merge_default_attributes, #merged_as_child_attributes, #nokogiri_attributes_to_hash, #overlay, #sanitize_as_child
Constructor Details
#initialize(name = nil, options = nil, html_options = nil) ⇒ BreadcrumbLink
Returns a new instance of BreadcrumbLink.
86 87 88 89 90 |
# File 'lib/shadcn_phlexcomponents/components/breadcrumb.rb', line 86 def initialize(name = nil, = nil, = nil) @name = name = = end |
Instance Method Details
#view_template ⇒ Object
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/shadcn_phlexcomponents/components/breadcrumb.rb', line 92 def view_template(&) if block_given? = = @name end ||= {} [:class] = class_variants(class: [:class]) if block_given? link_to(, , &) else link_to(@name, , ) end end |