Download tools/server/webui/src/lib/components/app/actions/ActionIcon.svelte from echodict/llama.cpp: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/datasets/echodict/llama.cpp/resolve/main/tools/server/webui/src/lib/components/app/actions/ActionIcon.svelte
- Command line
-
hf download hf://datasets/echodict/llama.cpp/tools/server/webui/src/lib/components/app/actions/ActionIcon.svelte
-
curl -L -o ActionIcon.svelte https://huggingface.co/datasets/echodict/llama.cpp/resolve/main/tools/server/webui/src/lib/components/app/actions/ActionIcon.svelte
1.04 kB
| <script lang="ts"> | |
| import { Button } from '$lib/components/ui/button'; | |
| import * as Tooltip from '$lib/components/ui/tooltip'; | |
| import type { Component } from 'svelte'; | |
| interface Props { | |
| icon: Component; | |
| tooltip: string; | |
| variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link'; | |
| size?: 'default' | 'sm' | 'lg' | 'icon'; | |
| iconSize?: string; | |
| class?: string; | |
| disabled?: boolean; | |
| onclick: (e?: MouseEvent) => void; | |
| 'aria-label'?: string; | |
| } | |
| let { | |
| icon, | |
| tooltip, | |
| variant = 'ghost', | |
| size = 'sm', | |
| class: className = '', | |
| disabled = false, | |
| iconSize = 'h-3 w-3', | |
| onclick, | |
| 'aria-label': ariaLabel | |
| }: Props = $props(); | |
| </script> | |
| <Tooltip.Root> | |
| <Tooltip.Trigger> | |
| <Button | |
| {variant} | |
| {size} | |
| {disabled} | |
| {onclick} | |
| class="h-6 w-6 p-0 {className} flex" | |
| aria-label={ariaLabel || tooltip} | |
| > | |
| {@const IconComponent = icon} | |
| <IconComponent class={iconSize} /> | |
| </Button> | |
| </Tooltip.Trigger> | |
| <Tooltip.Content> | |
| <p>{tooltip}</p> | |
| </Tooltip.Content> | |
| </Tooltip.Root> | |