-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move ButtonsPagination.svelte component in ui-components
- Loading branch information
1 parent
f9a5742
commit 03d3bc4
Showing
4 changed files
with
41 additions
and
40 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
packages/ui-components/src/lib/components/ButtonsPagination.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<script lang="ts"> | ||
import { ArrowLeftOutline, ArrowRightOutline } from 'flowbite-svelte-icons'; | ||
import { createEventDispatcher } from 'svelte'; | ||
import { Button, Spinner } from 'flowbite-svelte'; | ||
const dispatch = createEventDispatcher(); | ||
export let index: number = 1; | ||
export let loading = false; | ||
</script> | ||
|
||
<div class="flex items-center"> | ||
{#if loading} | ||
<Spinner class="mr-4 h-5 w-5" color="white" /> | ||
{/if} | ||
<Button | ||
class="border-1 rounded-none rounded-l-lg" | ||
disabled={loading || index == 1} | ||
on:click={() => dispatch('previous')} | ||
color="light" | ||
> | ||
<ArrowLeftOutline class="me-2 h-3.5 w-3.5" /> | ||
Previous | ||
</Button> | ||
<div | ||
class="justify-center border border-gray-300 bg-white px-5 py-2.5 text-center text-sm font-medium dark:border-gray-600 dark:bg-gray-800 dark:text-white" | ||
> | ||
{index} | ||
</div> | ||
<Button | ||
class="border-1 rounded-none rounded-r-lg" | ||
disabled={loading} | ||
on:click={() => dispatch('next')} | ||
color="light" | ||
> | ||
Next | ||
<ArrowRightOutline class="ms-2 h-3.5 w-3.5" /> | ||
</Button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.