Class: Shadcn::SidebarMenuBadgeComponent

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

Overview

SidebarMenuBadge component - badge within menu item

Constant Summary collapse

BASE_CLASSES =
"absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none"
COLLAPSED_CLASSES =
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground 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_menu_badge_component.rb', line 9

def call
  (:span, content, badge_attributes)
end