Update SelectAllButton.svelte

This commit is contained in:
freearhey 2023-10-10 06:14:44 +03:00
parent 93d1f85873
commit c0a4ab6794

View file

@ -13,43 +13,41 @@
} }
</script> </script>
<div class="w-14 sm:w-44"> {#if isAllSelected}
{#if isAllSelected} <DefaultButton on:click={deselectAll} area-label="Deselect All ({$selected.length})">
<DefaultButton on:click={deselectAll} area-label="Deselect All ({$selected.length})"> <span class="inline">
<span class="sm:hidden inline"> <svg
<svg xmlns="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
viewBox="0 0 24 24" fill="currentColor"
fill="currentColor" class="w-5 h-5"
class="w-5 h-5" >
> <path
<path fill-rule="evenodd"
fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25zm3 10.5a.75.75 0 000-1.5H9a.75.75 0 000 1.5h6z"
d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25zm3 10.5a.75.75 0 000-1.5H9a.75.75 0 000 1.5h6z" clip-rule="evenodd"
clip-rule="evenodd" />
/> </svg>
</svg> </span>
</span> <span class="hidden sm:inline">Deselect All ({$selected.length})</span>
<span class="hidden sm:inline">Deselect All ({$selected.length})</span> </DefaultButton>
</DefaultButton> {:else}
{:else} <DefaultButton on:click={selectAll} area-label="Select All ({$filteredChannels.length})">
<DefaultButton on:click={selectAll} area-label="Select All ({$filteredChannels.length})"> <span class="inline">
<span class="sm:hidden inline"> <svg
<svg xmlns="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
viewBox="0 0 24 24" fill="currentColor"
fill="currentColor" class="w-5 h-5"
class="w-5 h-5" >
> <path
<path fill-rule="evenodd"
fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z"
d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd"
clip-rule="evenodd" />
/> </svg>
</svg> </span>
</span>
<span class="hidden sm:inline">Select All ({$filteredChannels.length})</span> <span class="hidden sm:inline">Select All ({$filteredChannels.length})</span>
</DefaultButton> </DefaultButton>
{/if} {/if}
</div>