Class: Shadcn::TabsContentComponent

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

Overview

Tabs Content component

Constant Summary collapse

BASE_CLASSES =
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"

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:, **options) ⇒ TabsContentComponent

Returns a new instance of TabsContentComponent.

Parameters:

  • The value that identifies this tab panel



9
10
11
12
# File 'app/components/shadcn/tabs_content_component.rb', line 9

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

Instance Method Details

#callObject



14
15
16
# File 'app/components/shadcn/tabs_content_component.rb', line 14

def call
  (:div, content, content_attributes)
end