Spaces:
Paused
Paused
Download web/src/components/buttons/VerticalActionButton.svelte from Lordgrim7/cobalt-api: direct link, hf CLI and curl.
- Browser
- Download file 853 Bytes
-
https://huggingface.co/spaces/Lordgrim7/cobalt-api/resolve/main/web/src/components/buttons/VerticalActionButton.svelte
- Command line
-
hf download hf://spaces/Lordgrim7/cobalt-api/web/src/components/buttons/VerticalActionButton.svelte
-
curl -L -o VerticalActionButton.svelte https://huggingface.co/spaces/Lordgrim7/cobalt-api/resolve/main/web/src/components/buttons/VerticalActionButton.svelte
853 Bytes
| <script lang="ts"> | |
| export let id: string; | |
| export let click = () => { | |
| alert("no function assigned"); | |
| }; | |
| export let fill = false; | |
| export let elevated = false; | |
| export let ariaLabel = ""; | |
| </script> | |
| <button | |
| id="button-{id}" | |
| class="button vertical" | |
| class:fill | |
| class:elevated | |
| on:click={click} | |
| aria-label={ariaLabel} | |
| > | |
| <slot></slot> | |
| </button> | |
| <style> | |
| .button.vertical { | |
| flex-direction: column; | |
| line-height: 1; | |
| padding: var(--padding); | |
| gap: calc(var(--padding) / 2); | |
| } | |
| .button.vertical :global(svg) { | |
| width: 24px; | |
| height: 24px; | |
| } | |
| .button.vertical.fill { | |
| width: 100%; | |
| padding: var(--padding) 0; | |
| } | |
| .button.vertical :global(svg) { | |
| stroke-width: 1.8px; | |
| color: var(--secondary); | |
| } | |
| </style> | |