Files
fnx_web/svelte/src/admin_panel/SortButton.svelte

28 lines
423 B
Svelte
Raw Normal View History

2024-02-28 15:50:57 +01:00
<script>
export let field = ""
export let active_field = ""
export let asc = true
export let sort_func
</script>
<button class:button_highlight={active_field === field} on:click={() => sort_func(field)}>
2024-02-29 23:32:07 +01:00
{#if active_field === field}
{#if asc}
{:else}
{/if}
2024-02-28 15:50:57 +01:00
{/if}
<slot></slot>
</button>
<style>
button {
2024-04-10 18:35:51 +02:00
display: block;
2024-02-28 15:50:57 +01:00
margin: 0;
2024-02-29 23:32:07 +01:00
line-height: 1em;
2024-04-10 18:35:51 +02:00
width: 100%;
text-align: center;
2024-02-28 15:50:57 +01:00
}
</style>