feat: add new simple components

This commit is contained in:
2026-08-28 17:02:52 +05:00
parent d30deddce0
commit c0f48ecd97
11 changed files with 640 additions and 0 deletions
@@ -0,0 +1,37 @@
<script lang="ts">
import type { Component } from "svelte";
import { Upload } from "@lucide/svelte";
interface Props {
name: string;
size?: string;
icon?: Component<{ size?: number }>;
}
let { name, size, icon = Upload }: Props = $props();
const Cmp = $derived(icon);
</script>
<div class="file-chip">
<Cmp size={15} />
<span>{name}</span>
{#if size}<b>{size}</b>{/if}
</div>
<style>
.file-chip {
display: flex;
align-items: center;
gap: 8px;
white-space: nowrap;
border: 1px solid var(--line);
background: var(--panel);
font: 11px var(--font-mono);
color: var(--muted);
padding: 10px 12px;
}
.file-chip b {
color: var(--blue);
font-weight: 500;
}
</style>