Class: Shadcn::SidebarMenuSkeletonComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Shadcn::SidebarMenuSkeletonComponent
- 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
- #call ⇒ Object
-
#initialize(show_icon: false, **options) ⇒ SidebarMenuSkeletonComponent
constructor
A new instance of SidebarMenuSkeletonComponent.
Methods inherited from BaseComponent
Methods included from Rails::Helpers::ClassNameHelper
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, **) super(**) @show_icon = show_icon end |
Instance Method Details
#call ⇒ Object
13 14 15 |
# File 'app/components/shadcn/sidebar_menu_skeleton_component.rb', line 13 def call content_tag(:div, skeleton_content, skeleton_attributes) end |