Files
crumbs/src/lib/components/ColorPicker.svelte
T
Frederic CabassutandClaude Opus 4.6 c619515ca6 feat: remove dark mode support
Remove ThemeToggle component, theme store, dark: Tailwind variants,
and dark color values from NOTE_COLORS. Simplify color logic to use
a single bg property. Delete dark mode e2e tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 23:07:18 +01:00

25 lines
761 B
Svelte

<script lang="ts">
import { NOTE_COLORS, COLOR_OPTIONS } from '$lib/utils/colors.js';
import type { NoteColor } from '$lib/types/index.js';
interface Props {
selected: NoteColor;
onSelect: (color: NoteColor) => void;
}
let { selected, onSelect }: Props = $props();
</script>
<div class="flex flex-wrap gap-1" data-testid="color-picker">
{#each COLOR_OPTIONS as option}
{@const colors = NOTE_COLORS[option.value]}
<button
onclick={() => onSelect(option.value)}
class="h-8 w-8 rounded-full border-2 transition-transform hover:scale-110 {selected === option.value ? 'border-gray-800' : 'border-transparent'}"
style="background-color: {colors.bg}"
title={option.label}
data-testid="color-{option.value}"
></button>
{/each}
</div>