mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-19 20:09:35 +00:00
fix(pagination-nav): type dispatched events
This commit is contained in:
parent
90bd2a10b7
commit
95901c270f
6 changed files with 50 additions and 16 deletions
|
@ -1,4 +1,10 @@
|
|||
<script>
|
||||
/**
|
||||
* @event {{ page: number; }} change
|
||||
* @event {{ page: number; }} click:button--previous
|
||||
* @event {{ page: number; }} click:button--next
|
||||
*/
|
||||
|
||||
/** Specify the current page index */
|
||||
export let page = 0;
|
||||
|
||||
|
@ -18,11 +24,11 @@
|
|||
export let backwardText = "Previous page";
|
||||
|
||||
import { afterUpdate, createEventDispatcher } from "svelte";
|
||||
import CaretLeft16 from "carbon-icons-svelte/lib/CaretLeft16";
|
||||
import CaretRight16 from "carbon-icons-svelte/lib/CaretRight16";
|
||||
import CaretLeft16 from "carbon-icons-svelte/lib/CaretLeft16/CaretLeft16.svelte";
|
||||
import CaretRight16 from "carbon-icons-svelte/lib/CaretRight16/CaretRight16.svelte";
|
||||
import PaginationItem from "./PaginationItem.svelte";
|
||||
import PaginationOverflow from "./PaginationOverflow.svelte";
|
||||
import { Button } from "../Button";
|
||||
import Button from "../Button/Button.svelte";
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
const MIN = 4;
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<script>
|
||||
/**
|
||||
* @event {{ index: number; }} select
|
||||
*/
|
||||
|
||||
/** Specify the pivot start index */
|
||||
export let fromIndex = 0;
|
||||
|
||||
|
@ -6,7 +10,7 @@
|
|||
export let count = 0;
|
||||
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import OverflowMenuHorizontal16 from "carbon-icons-svelte/lib/OverflowMenuHorizontal16";
|
||||
import OverflowMenuHorizontal16 from "carbon-icons-svelte/lib/OverflowMenuHorizontal16/OverflowMenuHorizontal16.svelte";
|
||||
import PaginationItem from "./PaginationItem.svelte";
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue