{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A menu item: an optional icon, the label and an optional trailing mark (a check for selected items). tabindex -1: the menu moves focus with the arrow keys.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/patterns/dropdown-item.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/button\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// DropdownItemProps are the props of DropdownItem; the values are the JSON shapes of the TypeScript props.\ntype DropdownItemProps struct {\n\tSelected any `json:\"selected\"`\n\tClass string `json:\"className\"`\n\tIcon templ.Component `json:\"-\"`\n\tRight templ.Component `json:\"-\"`\n}\n\n// A menu item: an optional icon, the label and an optional trailing mark (a check for selected items). tabindex -1: the menu moves focus with the arrow keys.\ntempl DropdownItem(p DropdownItemProps) {\n\t{{ vSelected := uiutils.Def(p.Selected, false) }}\n\t@compose.ButtonPlain(compose.ButtonPlainProps{ButtonProps: button.ButtonProps{Type: \"button\", Class: uiutils.S(uiutils.Cnv(\"group flex h-9 w-full items-center px-2 text-left text-foreground\", p.Class)), Attrs: uiutils.Attrs(\"role\", \"menuitem\", \"tabindex\", float64(-1), \"data-slot\", \"dropdown-item\", \"data-state\", uiutils.Cond(uiutils.T(vSelected), \"selected\", \"default\"))}}) {\n\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"flex h-7 min-w-0 flex-1 items-center rounded p-1 group-hover:bg-muted group-focus-visible:bg-muted group-data-[state=selected]:bg-muted\", Attrs: uiutils.Attrs(\"data-slot\", \"dropdown-item-content\")}}) {\n\t\t\tif uiutils.T((p.Icon != nil)) {\n\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"flex w-7 shrink-0 items-center pr-2\", Attrs: uiutils.Attrs(\"data-slot\", \"dropdown-item-icon\")}}) {\n\t\t\t\t\tif p.Icon != nil {\n\t\t\t\t\t\t@p.Icon\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: uiutils.S(uiutils.Cnv(\"text-xs\", \"min-w-0 flex-1 truncate px-1 font-bold\")), Attrs: uiutils.Attrs(\"data-slot\", \"dropdown-item-label\")}}) {\n\t\t\t\t{ children... }\n\t\t\t}\n\t\t\tif uiutils.T((p.Right != nil)) {\n\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"flex shrink-0 items-center pr-1\", Attrs: uiutils.Attrs(\"data-slot\", \"dropdown-item-right\")}}) {\n\t\t\t\t\tif p.Right != nil {\n\t\t\t\t\t\t@p.Right\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/dropdown-item.templ",
      "target": "blocks/dropdown-item.templ"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "templ",
      "component"
    ]
  },
  "name": "dropdown-item",
  "registryDependencies": [
    "button-plain",
    "inline",
    "kit-button",
    "kit-text",
    "utils"
  ],
  "runtime": "templ",
  "title": "Dropdown Item",
  "type": "registry:component"
}
