replace google material icons with phosphor icons

This commit is contained in:
Elijah Duffy
2025-07-10 16:25:27 -07:00
parent 355850d1f2
commit 5f4e50a652
7 changed files with 59 additions and 27 deletions

View File

@@ -7,6 +7,7 @@
import { validate } from '@svelte-toolkit/validate';
import { generateIdentifier } from './util';
import type { ClassValue } from 'svelte/elements';
import { Check, Minus } from 'phosphor-svelte';
interface Props {
name?: string;
@@ -31,6 +32,7 @@
let id = $derived(generateIdentifier('checkbox', name));
let valid = $state(true);
let Icon = $derived(value === 'indeterminate' ? Minus : value ? Check : undefined);
</script>
<div class={['flex items-center', classValue]}>
@@ -69,10 +71,8 @@
onchange?.(value);
}}
>
{#if value === 'indeterminate'}
<span class="material-symbols-outlined">remove</span>
{:else if value === true}
<span class="material-symbols-outlined">check</span>
{#if Icon}
<Icon weight="bold" size="1.1em"></Icon>
{/if}
</button>