Something went wrong. Try again.
Monorepo for Tangled
Something went wrong. Try again.
Svelte
at icy/tmrrpn
12345678910111213141516171819202122232425262728293031<script lang="ts"> import EllipsisVertical from "$icon/ellipsis-vertical"; import Dropdown, { type DropdownProps } from "./Dropdown.svelte";
/** * The secondary actions of a thing, behind one ellipsis. It is a Dropdown with a * settled trigger, so anything Dropdown takes passes straight through — reach for * Dropdown itself when the trigger has to say something else. * * `label` names the button for screen readers and has to say *which* thing it acts * on: a list of rows each answering "More actions" gives no way to tell them apart. */ type Props = Omit<DropdownProps, "trigger" | "variant" | "label"> & { label: string };
let { label, align = "right", buttonVariant = "ghost", menuClass = "min-w-48", children, ...rest }: Props = $props();</script>
<Dropdown variant="button" {label} {align} {buttonVariant} {menuClass} {...rest}> {#snippet trigger()} <EllipsisVertical class="size-3.5" /> {/snippet} {@render children()}</Dropdown>