Начальный коммит
This commit is contained in:
commit
203b2d8403
42 changed files with 5183 additions and 0 deletions
27
src/lib/components/HoverIcon.svelte
Normal file
27
src/lib/components/HoverIcon.svelte
Normal file
|
@ -0,0 +1,27 @@
|
|||
<script lang="ts">
|
||||
import Icon from '@iconify/svelte';
|
||||
|
||||
let className: string = '';
|
||||
export { className as class };
|
||||
export let src: string | null = null;
|
||||
export let text: string;
|
||||
export let size: number = 32;
|
||||
|
||||
let isUrl;
|
||||
$: isUrl = src?.startsWith('/') || src?.startsWith('http');
|
||||
</script>
|
||||
|
||||
<div class="{className} fill-slate-50 text-sm uppercase transition-all">
|
||||
{#if src}
|
||||
{#if isUrl}
|
||||
<img {src} alt={text} width={size} height={size} />
|
||||
{:else}
|
||||
<Icon width={size} height={size} icon={src} color="#f8fafc" />
|
||||
{/if}
|
||||
{:else}
|
||||
{text}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
</style>
|
Loading…
Add table
Add a link
Reference in a new issue