mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
chore(prettier): use svelteStrictMode
This commit is contained in:
parent
322b238cf0
commit
42b8159b1c
182 changed files with 2020 additions and 1912 deletions
|
@ -107,12 +107,12 @@
|
|||
$: forwardButtonDisabled = disabled || page === totalPages;
|
||||
</script>
|
||||
|
||||
<div {id} class:bx--pagination={true} {...$$restProps}>
|
||||
<div class:bx--pagination__left={true}>
|
||||
<div id="{id}" class:bx--pagination="{true}" {...$$restProps}>
|
||||
<div class:bx--pagination__left="{true}">
|
||||
<label
|
||||
id="bx--pagination-select-{id}-count-label"
|
||||
for="bx--pagination-select-{id}"
|
||||
class:bx--pagination__text={true}>
|
||||
class:bx--pagination__text="{true}">
|
||||
{itemsPerPageText}
|
||||
</label>
|
||||
<Select
|
||||
|
@ -121,12 +121,12 @@
|
|||
hideLabel
|
||||
noLabel
|
||||
inline
|
||||
bind:selected={pageSize}>
|
||||
bind:selected="{pageSize}">
|
||||
{#each pageSizes as size, i (size)}
|
||||
<SelectItem value={size} text={size.toString()} />
|
||||
<SelectItem value="{size}" text="{size.toString()}" />
|
||||
{/each}
|
||||
</Select>
|
||||
<span class:bx--pagination__text={true}>
|
||||
<span class:bx--pagination__text="{true}">
|
||||
{#if pagesUnknown}
|
||||
{itemText(pageSize * (page - 1) + 1, page * pageSize)}
|
||||
{:else}
|
||||
|
@ -134,7 +134,7 @@
|
|||
{/if}
|
||||
</span>
|
||||
</div>
|
||||
<div class:bx--pagination__right={true}>
|
||||
<div class:bx--pagination__right="{true}">
|
||||
{#if !pageInputDisabled}
|
||||
<Select
|
||||
id="bx--pagination-select-{id + 2}"
|
||||
|
@ -142,12 +142,12 @@
|
|||
labelText="Page number, of {totalPages} pages"
|
||||
inline
|
||||
hideLabel
|
||||
bind:selected={page}>
|
||||
bind:selected="{page}">
|
||||
{#each selectItems as size, i (size)}
|
||||
<SelectItem value={size + 1} text={(size + 1).toString()} />
|
||||
<SelectItem value="{size + 1}" text="{(size + 1).toString()}" />
|
||||
{/each}
|
||||
</Select>
|
||||
<span class:bx--pagination__text={true}>
|
||||
<span class:bx--pagination__text="{true}">
|
||||
{#if pagesUnknown}
|
||||
{pageText(page)}
|
||||
{:else}{pageRangeText(page, totalPages)}{/if}
|
||||
|
@ -155,26 +155,26 @@
|
|||
{/if}
|
||||
<button
|
||||
type="button"
|
||||
aria-label={backwardText}
|
||||
disabled={backButtonDisabled}
|
||||
class:bx--pagination__button={true}
|
||||
class:bx--pagination__button--backward={true}
|
||||
class:bx--pagination__button--no-index={backButtonDisabled}
|
||||
on:click={() => {
|
||||
aria-label="{backwardText}"
|
||||
disabled="{backButtonDisabled}"
|
||||
class:bx--pagination__button="{true}"
|
||||
class:bx--pagination__button--backward="{true}"
|
||||
class:bx--pagination__button--no-index="{backButtonDisabled}"
|
||||
on:click="{() => {
|
||||
page--;
|
||||
}}>
|
||||
}}">
|
||||
<CaretLeft24 />
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
aria-label={forwardText}
|
||||
disabled={forwardButtonDisabled}
|
||||
class:bx--pagination__button={true}
|
||||
class:bx--pagination__button--forward={true}
|
||||
class:bx--pagination__button--no-index={forwardButtonDisabled}
|
||||
on:click={() => {
|
||||
aria-label="{forwardText}"
|
||||
disabled="{forwardButtonDisabled}"
|
||||
class:bx--pagination__button="{true}"
|
||||
class:bx--pagination__button--forward="{true}"
|
||||
class:bx--pagination__button--no-index="{forwardButtonDisabled}"
|
||||
on:click="{() => {
|
||||
page++;
|
||||
}}>
|
||||
}}">
|
||||
<CaretRight24 />
|
||||
</button>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue