Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions lib/ruby_ui/context_menu/context_menu_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,15 @@ def default_attrs
{
href: @href,
role: "menuitem",
class:
"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 pl-8",
class: [
"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none pl-8",
"hover:bg-accent hover:text-accent-foreground",
"focus:bg-accent focus:text-accent-foreground",
"disabled:pointer-events-none disabled:opacity-50",
"aria-selected:bg-accent aria-selected:text-accent-foreground",
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
"aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-disabled:cursor-not-allowed"
],
tabindex: "-1",
data_orientation: "vertical",
data_action: "click->ruby-ui--context-menu#close",
Expand Down
10 changes: 9 additions & 1 deletion lib/ruby_ui/dropdown_menu/dropdown_menu_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ def default_attrs
{
href: @href,
role: "menuitem",
class: "relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
class: [
"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors",
"hover:bg-accent hover:text-accent-foreground",
"focus:bg-accent focus:text-accent-foreground",
"disabled:pointer-events-none disabled:opacity-50",
"aria-selected:bg-accent aria-selected:text-accent-foreground",
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
"aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-disabled:cursor-not-allowed"
],
data_action: "click->ruby-ui--dropdown-menu#close",
data_ruby_ui__dropdown_menu_target: "menuItem",
tabindex: "-1",
Expand Down