Class: Shadcn::MenubarRadioGroupComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/shadcn/menubar_radio_group_component.rb

Overview

Menubar Radio Group component Group of mutually exclusive radio items

Instance Attribute Summary

Attributes inherited from BaseComponent

#class_name, #data, #html_options

Instance Method Summary collapse

Methods inherited from BaseComponent

#content

Methods included from Rails::Helpers::ClassNameHelper

#cn

Constructor Details

#initialize(value: nil, **options, &block) ⇒ MenubarRadioGroupComponent

Returns a new instance of MenubarRadioGroupComponent.

Parameters:

  • value (String) (defaults to: nil)

    Currently selected value



12
13
14
15
# File 'app/components/shadcn/menubar_radio_group_component.rb', line 12

def initialize(value: nil, **options, &block)
  super(**options, &block)
  @value = value
end

Instance Method Details

#callObject



17
18
19
# File 'app/components/shadcn/menubar_radio_group_component.rb', line 17

def call
  (:div, group_content, group_attributes)
end