refactor: icon and download button use button component

This commit is contained in:
2026-09-02 18:37:43 +05:00
parent 3d0f8ebb10
commit 8a6f87938d
16 changed files with 85 additions and 167 deletions
@@ -0,0 +1,23 @@
<script lang="ts">
import type { Component } from "svelte";
import { ButtonVariantDefine, type ButtonVariant } from "../define";
import Button from "./Button.svelte";
interface Props {
icon: Component<{ size?: number; class?: string }>;
label: string;
onclick?: () => void;
variant?: ButtonVariant;
disabled?: boolean;
}
let {
icon,
label,
onclick,
variant = ButtonVariantDefine.PRIMARY,
disabled = false,
}: Props = $props();
</script>
<Button label="" {onclick} {variant} {disabled} {icon} ariaLabel={label} />