Class: Shadcn::SidebarGroupActionComponent

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

Overview

SidebarGroupAction component - action button for a sidebar group

Constant Summary collapse

BASE_CLASSES =
"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0"
COLLAPSED_CLASSES =
"group-data-[collapsible=icon]:hidden"

Instance Attribute Summary

Attributes inherited from BaseComponent

#class_name, #data, #html_options

Instance Method Summary collapse

Methods inherited from BaseComponent

#content, #initialize

Methods included from Rails::Helpers::ClassNameHelper

#cn

Constructor Details

This class inherits a constructor from Shadcn::BaseComponent

Instance Method Details

#callObject



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

def call
  (:button, content, action_attributes)
end