replace google material icons with phosphor icons
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user