{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Dropdown Item component",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->\n<!--\n  A menu item: an optional icon, the label and an optional trailing mark (a check for selected items). tabindex\n  -1: the menu moves focus with the arrow keys.\n-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n\n  export type DropdownItemProps = {\n    selected?: boolean;\n    class?: string;\n    children?: Snippet;\n    icon?: Snippet;\n    right?: Snippet;\n    onclick?: () => void;\n  };\n</script>\n\n<script lang=\"ts\">\n  import ButtonPlain from \"../compose/ButtonPlain.svelte\";\n  import Inline from \"../compose/Inline.svelte\";\n  import { cn } from \"../utils\";\n\n  let { selected = false, class: className, children, icon, right, onclick }: DropdownItemProps = $props();\n</script>\n\n<ButtonPlain\n  type=\"button\"\n  role=\"menuitem\"\n  class={cn(\"group flex h-9 w-full items-center px-2 text-left text-foreground\", className)}\n  tabindex={-1}\n  data-slot=\"dropdown-item\"\n  data-state={(selected ? \"selected\" : \"default\")}\n  onclick={() => onclick?.()}\n>\n  <Inline\n    class={\"flex h-7 min-w-0 flex-1 items-center rounded p-1 group-hover:bg-muted group-focus-visible:bg-muted \" +\n      \"group-data-[state=selected]:bg-muted\"}\n    data-slot=\"dropdown-item-content\"\n  >\n    {#if icon}\n      <Inline class=\"flex w-7 shrink-0 items-center pr-2\" data-slot=\"dropdown-item-icon\">\n        {@render icon?.()}\n      </Inline>\n    {/if}\n    <Inline class={cn(\"text-xs\", \"min-w-0 flex-1 truncate px-1 font-bold\")} data-slot=\"dropdown-item-label\">\n      {@render children?.()}\n    </Inline>\n    {#if right}\n      <Inline class=\"flex shrink-0 items-center pr-1\" data-slot=\"dropdown-item-right\">\n        {@render right?.()}\n      </Inline>\n    {/if}\n  </Inline>\n</ButtonPlain>\n",
      "path": "components/dropdown-item.svelte",
      "target": "components/dropdown-item.svelte"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "svelte",
      "component"
    ]
  },
  "name": "dropdown-item",
  "registryDependencies": [
    "button-plain",
    "inline",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Dropdown Item",
  "type": "registry:component"
}
