mirror of
https://github.com/ReVanced/revanced-website.git
synced 2026-01-26 04:11:02 +00:00
chore: routing
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
export let href = '';
|
||||
export let maxWidth = false;
|
||||
export let icon = '';
|
||||
export let alt = '';
|
||||
export let target = '';
|
||||
export let unclickable = false;
|
||||
</script>
|
||||
@@ -11,7 +12,7 @@
|
||||
<a {href} {target} on:click class:unclickable>
|
||||
<div class={type} style="width: {maxWidth ? '100%' : 'max-content'}">
|
||||
{#if icon}
|
||||
<img src="../icons/{icon}.svg" alt={icon} />
|
||||
<img src={icon} {alt} />
|
||||
{/if}
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
import Modal from './Dialogue.svelte';
|
||||
import Button from './Button.svelte';
|
||||
|
||||
import next from '$lib/assets/icons/next.svg';
|
||||
import previous from '$lib/assets/icons/previous.svg';
|
||||
|
||||
export let name = '';
|
||||
export let selected: Array<string>;
|
||||
export let variants;
|
||||
@@ -109,14 +112,16 @@
|
||||
on:click={prevVariant}
|
||||
on:click={stopAutoScroll}
|
||||
unclickable={i <= 0}
|
||||
icon="previous"
|
||||
icon={previous}
|
||||
alt="previous"
|
||||
/>
|
||||
<h4>{i + 1}/{variants.length}</h4>
|
||||
<Button
|
||||
on:click={nextVariant}
|
||||
on:click={stopAutoScroll}
|
||||
unclickable={i + 1 >= variants.length}
|
||||
icon="next"
|
||||
icon={next}
|
||||
alt="next"
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user