From 5ace4aee07f9b20e61e0856d5f4bc9a88717a12d Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Wed, 24 Jun 2026 15:33:33 +0300 Subject: [PATCH] feat(Board): add CandidateCard mini switcher --- .../CandidateCard.stories.svelte | 36 +++++++++++ .../ui/CandidateCard/CandidateCard.svelte | 62 +++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 src/widgets/Board/ui/CandidateCard/CandidateCard.stories.svelte create mode 100644 src/widgets/Board/ui/CandidateCard/CandidateCard.svelte diff --git a/src/widgets/Board/ui/CandidateCard/CandidateCard.stories.svelte b/src/widgets/Board/ui/CandidateCard/CandidateCard.stories.svelte new file mode 100644 index 0000000..09c0d6c --- /dev/null +++ b/src/widgets/Board/ui/CandidateCard/CandidateCard.stories.svelte @@ -0,0 +1,36 @@ + + + + + + {#snippet template(args: ComponentProps)} +
+ +
+ {/snippet} +
diff --git a/src/widgets/Board/ui/CandidateCard/CandidateCard.svelte b/src/widgets/Board/ui/CandidateCard/CandidateCard.svelte new file mode 100644 index 0000000..ffb95dd --- /dev/null +++ b/src/widgets/Board/ui/CandidateCard/CandidateCard.svelte @@ -0,0 +1,62 @@ + + + + + +{#snippet name(role: Role, label: string, font: UnifiedFont | undefined)} + {@const size = role === 'header' ? 'clamp(0.9rem, 5cqi, 1.25rem)' : 'clamp(0.75rem, 4cqi, 1rem)'} + {#if font} + + {label} + + {:else} + {label} + {/if} +{/snippet}