CI / changes (push) Successful in 5s
CI / openapi (push) Has been skipped
CI / go (push) Successful in 20s
CI / bird2 (push) Successful in 16s
CI / docker-images (deploy/docker/bird2/Dockerfile, , evobgp-bird2) (push) Successful in 40s
CI / docker-images (deploy/docker/evobgp-agent/Dockerfile, , evobgp-agent) (push) Successful in 1m6s
CI / docker-images (deploy/docker/evobgp-web/Dockerfile, , evobgp-web) (push) Successful in 1m1s
CI / docker-images (deploy/docker/evobgp-web/Dockerfile, evobgp-all, evobgp-web-all) (push) Successful in 59s
CI / docker-images (evobgp-all, 1, deploy/docker/gobinary/Dockerfile, , evobgp-all) (push) Successful in 1m23s
CI / docker-images (evobgp-deploy, 0, deploy/docker/gobinary/Dockerfile, , evobgp-deploy) (push) Successful in 1m31s
CI / docker-images (evobgp-ingest, 0, deploy/docker/gobinary/Dockerfile, , evobgp-ingest) (push) Successful in 1m27s
CI / docker-images (evobgp-node, 0, deploy/docker/gobinary/Dockerfile, , evobgp-node) (push) Successful in 1m12s
CI / docker-images (evobgp-render, 0, deploy/docker/gobinary/Dockerfile, , evobgp-render) (push) Successful in 1m25s
CI / docker-images (evobgp-scheduler, 0, deploy/docker/gobinary/Dockerfile, , evobgp-scheduler) (push) Successful in 1m24s
CI / docker-images (evobgp-api, 1, deploy/docker/gobinary/Dockerfile, , evobgp-api) (push) Successful in 1m31s
45 lines
1.4 KiB
Svelte
45 lines
1.4 KiB
Svelte
<script lang="ts">
|
|
import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
|
|
import MinusIcon from '@lucide/svelte/icons/minus';
|
|
import CheckIcon from '@lucide/svelte/icons/check';
|
|
import { cn, type WithoutChildrenOrChild } from "$lib/utils.js";
|
|
import type { Snippet } from "svelte";
|
|
|
|
let {
|
|
ref = $bindable(null),
|
|
checked = $bindable(false),
|
|
indeterminate = $bindable(false),
|
|
class: className,
|
|
children: childrenProp,
|
|
...restProps
|
|
}: WithoutChildrenOrChild<DropdownMenuPrimitive.CheckboxItemProps> & {
|
|
children?: Snippet;
|
|
} = $props();
|
|
</script>
|
|
|
|
<DropdownMenuPrimitive.CheckboxItem
|
|
bind:ref
|
|
bind:checked
|
|
bind:indeterminate
|
|
data-slot="dropdown-menu-checkbox-item"
|
|
class={cn(
|
|
"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
className
|
|
)}
|
|
{...restProps}
|
|
>
|
|
{#snippet children({ checked, indeterminate })}
|
|
<span
|
|
class="absolute right-2 flex items-center justify-center pointer-events-none"
|
|
data-slot="dropdown-menu-checkbox-item-indicator"
|
|
>
|
|
{#if indeterminate}
|
|
<MinusIcon />
|
|
{:else if checked}
|
|
<CheckIcon />
|
|
{/if}
|
|
</span>
|
|
{@render childrenProp?.()}
|
|
{/snippet}
|
|
</DropdownMenuPrimitive.CheckboxItem>
|