|
|
@@ -19,11 +19,11 @@
|
|
|
const labels = [{ text: 'One color' }, { text: 'Two color' }, { text: 'Four color' }, { text: 'Other' }];
|
|
|
|
|
|
const speedBtns = [0.5, 1, 2];
|
|
|
- let speed = 1;
|
|
|
+ let speed = $state(1);
|
|
|
</script>
|
|
|
|
|
|
<div class="py-4">
|
|
|
- <Tabs tab={{ labels, mx: '4' }}>
|
|
|
+ <Tabs tab={{ labels }}>
|
|
|
<TabContent>
|
|
|
<div class="py-4">
|
|
|
<div class="flex text-center font-bold text-sm">
|
|
|
@@ -32,22 +32,21 @@
|
|
|
{/each}
|
|
|
</div>
|
|
|
<div class="grid grid-cols-5">
|
|
|
- <!-- eslint-disable-next-line no-unused-vars -->
|
|
|
{#each arr1 as item, i}
|
|
|
<div class="py-6 w-full flex flex-col items-center border border-black/5 dark:border-white/5">
|
|
|
- <div class="w-[32px] h-[32px]">
|
|
|
+ <div class="w-8 h-8">
|
|
|
<Loading type={'1_' + i} bind:speed />
|
|
|
</div>
|
|
|
<div class="text-xs text-center mt-8">{'1_' + i}</div>
|
|
|
</div>
|
|
|
<div class="py-6 w-full flex flex-col items-center border border-black/5 dark:border-white/5">
|
|
|
- <div class="w-[32px] h-[32px]">
|
|
|
+ <div class="w-8 h-8">
|
|
|
<Loading type={'1_' + i} theme bind:speed />
|
|
|
</div>
|
|
|
<div class="text-xs text-center mt-8">{'1_' + i}</div>
|
|
|
</div>
|
|
|
<div class="py-6 w-full flex flex-col items-center border border-black/5 dark:border-white/5">
|
|
|
- <div class="w-[32px] h-[32px]">
|
|
|
+ <div class="w-8 h-8">
|
|
|
<Loading type={'1_' + i} theme customColor={randomColorArr(1)} bind:speed />
|
|
|
</div>
|
|
|
<div class="text-xs text-center mt-8">{'1_' + i}</div>
|
|
|
@@ -55,7 +54,7 @@
|
|
|
<div
|
|
|
class="py-6 w-full flex flex-col items-center border border-white/5 dark:border-black/5 bg-darkBlack dark:bg-darkWhite text-white dark:text-black"
|
|
|
>
|
|
|
- <div class="w-[32px] h-[32px]">
|
|
|
+ <div class="w-8 h-8">
|
|
|
<Loading type={'1_' + i} inverse bind:speed />
|
|
|
</div>
|
|
|
<div class="text-xs text-center mt-8">{'1_' + i}</div>
|
|
|
@@ -63,7 +62,7 @@
|
|
|
<div
|
|
|
class="py-6 w-full flex flex-col items-center border border-white/5 dark:border-black/5 bg-darkBlack dark:bg-darkWhite text-white dark:text-black"
|
|
|
>
|
|
|
- <div class="w-[32px] h-[32px]">
|
|
|
+ <div class="w-8 h-8">
|
|
|
<Loading type={'1_' + i} theme inverse bind:speed />
|
|
|
</div>
|
|
|
<div class="text-xs text-center mt-8">{'1_' + i}</div>
|
|
|
@@ -81,16 +80,15 @@
|
|
|
{/each}
|
|
|
</div>
|
|
|
<div class="grid grid-cols-3">
|
|
|
- <!-- eslint-disable-next-line no-unused-vars -->
|
|
|
{#each arr2 as item, i}
|
|
|
<div class="py-6 w-full flex flex-col items-center border border-black/5 dark:border-white/5">
|
|
|
- <div class="w-[32px] h-[32px]">
|
|
|
+ <div class="w-8 h-8">
|
|
|
<Loading type={'2_' + i} bind:speed />
|
|
|
</div>
|
|
|
<div class="text-xs text-center mt-8">{'2_' + i}</div>
|
|
|
</div>
|
|
|
<div class="py-6 w-full flex flex-col items-center border border-black/5 dark:border-white/5">
|
|
|
- <div class="w-[32px] h-[32px]">
|
|
|
+ <div class="w-8 h-8">
|
|
|
<Loading type={'2_' + i} customColor={randomColorArr(2)} bind:speed />
|
|
|
</div>
|
|
|
<div class="text-xs text-center mt-8">{'2_' + i}</div>
|
|
|
@@ -98,7 +96,7 @@
|
|
|
<div
|
|
|
class="py-6 w-full flex flex-col items-center border border-white/5 dark:border-black/5 bg-darkBlack dark:bg-darkWhite text-white dark:text-black"
|
|
|
>
|
|
|
- <div class="w-[32px] h-[32px]">
|
|
|
+ <div class="w-8 h-8">
|
|
|
<Loading type={'2_' + i} inverse bind:speed />
|
|
|
</div>
|
|
|
<div class="text-xs text-center mt-8">{'2_' + i}</div>
|
|
|
@@ -116,16 +114,15 @@
|
|
|
{/each}
|
|
|
</div>
|
|
|
<div class="grid grid-cols-4">
|
|
|
- <!-- eslint-disable-next-line no-unused-vars -->
|
|
|
{#each arr4 as item, i}
|
|
|
<div class="py-6 w-full flex flex-col items-center border border-black/5 dark:border-white/5">
|
|
|
- <div class="w-[32px] h-[32px]">
|
|
|
+ <div class="w-8 h-8">
|
|
|
<Loading type={'4_' + i} bind:speed />
|
|
|
</div>
|
|
|
<div class="text-xs text-center mt-8">{'4_' + i}</div>
|
|
|
</div>
|
|
|
<div class="py-6 w-full flex flex-col items-center border border-black/5 dark:border-white/5">
|
|
|
- <div class="w-[32px] h-[32px]">
|
|
|
+ <div class="w-8 h-8">
|
|
|
<Loading type={'4_' + i} customColor={randomColorArr(4)} bind:speed />
|
|
|
</div>
|
|
|
<div class="text-xs text-center mt-8">{'4_' + i}</div>
|
|
|
@@ -136,7 +133,7 @@
|
|
|
<div class="text-xs p-4">Continually updated...</div>
|
|
|
</TabContent>
|
|
|
<TabContent>
|
|
|
- <div class="py-4" />
|
|
|
+ <div class="py-4"></div>
|
|
|
<div class="text-xs p-4">Continually updated...</div>
|
|
|
</TabContent>
|
|
|
</Tabs>
|
|
|
@@ -145,7 +142,7 @@
|
|
|
<div class="sticky bottom-0 left-0 w-full flex gap-3 justify-between px-2 z-10 bg-white/60 dark:bg-black/60 backdrop-blur">
|
|
|
{#each speedBtns as item}
|
|
|
<div class="flex-1">
|
|
|
- <Button fill={speed === item ? 'base' : 'lineTheme'} size="full" injClass="text-xs px-2" on:click={() => (speed = item)}>
|
|
|
+ <Button fill={speed === item ? 'base' : 'lineTheme'} size="full" injClass="text-xs px-2" onclick={() => (speed = item)}>
|
|
|
{item}x speed
|
|
|
</Button>
|
|
|
</div>
|