Class: ShadcnPhlexcomponents::RadioGroupItemIndicator

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

Constant Summary

Constants inherited from Base

Base::SANITIZER_ALLOWED_ATTRIBUTES, Base::SANITIZER_ALLOWED_TAGS, 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



171
172
173
# File 'lib/shadcn_phlexcomponents/components/radio_group.rb', line 171

def default_attributes
  { data: { radio_group_target: "indicator" } }
end

#view_template ⇒ Object



175
176
177
178
179
# File 'lib/shadcn_phlexcomponents/components/radio_group.rb', line 175

def view_template(&)
  span(**@attributes) do
    icon("circle", class: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2")
  end
end