mirror of
https://github.com/ReVanced/revanced-website.git
synced 2026-01-28 21:31:04 +00:00
feat: Use icon library instead of SVGs (#271)
This commit is contained in:
@@ -1,23 +1,16 @@
|
||||
<script lang="ts">
|
||||
export let type: 'filled' | 'tonal' | 'text' | 'outlined';
|
||||
export let icon = '';
|
||||
export let href = '';
|
||||
export let target = '';
|
||||
export let label = '';
|
||||
export let href: string = '';
|
||||
export let target: string = '';
|
||||
export let label: string = '';
|
||||
</script>
|
||||
|
||||
{#if href}
|
||||
<a {href} {target} class={`button-${type}`} aria-label={label}>
|
||||
{#if icon}
|
||||
<img src="../icons/{icon}.svg" alt={icon} />
|
||||
{/if}
|
||||
<slot />
|
||||
</a>
|
||||
{:else}
|
||||
<button on:click class={`button-${type}`} aria-label={label}>
|
||||
{#if icon}
|
||||
<img src="../icons/{icon}.svg" alt={icon} />
|
||||
{/if}
|
||||
<slot />
|
||||
</button>
|
||||
{/if}
|
||||
@@ -74,8 +67,4 @@
|
||||
a:hover {
|
||||
filter: brightness(85%);
|
||||
}
|
||||
|
||||
img {
|
||||
height: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user