feature/project-redesign #28

Merged
ilia merged 88 commits from feature/project-redesign into main 2026-03-02 19:46:39 +00:00
Showing only changes of commit 98101217db - Show all commits

View File

@@ -0,0 +1,37 @@
<!--
Component: IconButton
Convenience wrapper — defaults variant to 'icon' and enforces icon-only usage.
Identical to <Button variant="icon"> but makes intent explicit at the
call site and prevents accidental children being passed.
-->
<script lang="ts">
import type { ComponentProps } from 'svelte';
import Button from './Button.svelte';
import type { ButtonVariant } from './types';
type BaseProps = Exclude<ComponentProps<typeof Button>, 'children' | 'iconPosition'>;
interface Props extends BaseProps {
variant?: Extract<ButtonVariant, 'icon' | 'ghost' | 'secondary'>;
}
let {
variant = 'icon',
size = 'md',
icon,
active = false,
animate = true,
class: className,
...rest
}: Props = $props();
</script>
<Button
{variant}
{size}
{icon}
{active}
{animate}
class={className}
{...rest}
/>