Class: Shadcn::SidebarMenuSkeletonComponent

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

Overview

SidebarMenuSkeleton component - loading skeleton for menu item

Constant Summary collapse

BASE_CLASSES =
"rounded-md h-8 flex gap-2 px-2 items-center"

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(show_icon: false, **options) ⇒ SidebarMenuSkeletonComponent

Returns a new instance of SidebarMenuSkeletonComponent.



8
9
10
11
# File 'app/components/shadcn/sidebar_menu_skeleton_component.rb', line 8

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

Instance Method Details

#callObject



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

def call
  (:div, skeleton_content, skeleton_attributes)
end