mirror of
https://github.com/ReVanced/revanced-website.git
synced 2026-01-28 05:11:02 +00:00
guh download selection buttons work
Co-authored-by: sn <baiorett@koisu.ru>
This commit is contained in:
@@ -1,12 +1,25 @@
|
||||
<script>
|
||||
import DownloadSelection from '../atoms/DownloadSelection.svelte';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
export let items = ['Manager', 'CLI', 'Patches', 'Integrations'];
|
||||
|
||||
export let activeTab = 'Manager';
|
||||
|
||||
$: handleTabChange = (item) => {
|
||||
activeTab = item;
|
||||
};
|
||||
</script>
|
||||
|
||||
<div class="download-selection">
|
||||
<DownloadSelection>Manager</DownloadSelection>
|
||||
<DownloadSelection>CLI</DownloadSelection>
|
||||
<DownloadSelection>Patches</DownloadSelection>
|
||||
<DownloadSelection>Integrations</DownloadSelection>
|
||||
{#each items as item}
|
||||
<DownloadSelection active={item === activeTab}
|
||||
on:click={handleTabChange(item)}>
|
||||
{item}
|
||||
</DownloadSelection>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
@@ -15,7 +28,6 @@
|
||||
border-radius: 200px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
padding: 8px 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user