fix: resolve all issues in npm run check (#70)

Co-authored-by: Ax333l <main@axelen.xyz>
This commit is contained in:
afn
2023-02-27 16:16:56 -05:00
committed by GitHub
parent 8720546722
commit 458cf9bcc6
23 changed files with 114 additions and 96 deletions

View File

@@ -7,17 +7,29 @@
</script>
<button on:click>
<svelte:element
this={href ? 'a' : 'div'}
{href}
{target}
class={type}
>
{#if icon}
<img src="../icons/{icon}.svg" alt={icon} />
{/if}
<slot />
</svelte:element>
{#if href}
<a
{href}
{target}
{...$$restProps}
class={type}
>
{#if icon}
<img src="../icons/{icon}.svg" alt={icon} />
{/if}
<slot />
</a>
{:else}
<div
{...$$restProps}
class={type}
>
{#if icon}
<img src="../icons/{icon}.svg" alt={icon} />
{/if}
<slot />
</div>
{/if}
</button>
<style>

View File

@@ -1,6 +1,7 @@
<script lang="ts">
// See: https://github.com/JonasKruckenberg/imagetools/blob/main/docs/directives.md#picture
export let data;
import type { Picture } from 'vite-imagetools';
export let data: Picture;
export let alt: string;
</script>