Skip to content

Commit

Permalink
feat(result table): make pagination more visible
Browse files Browse the repository at this point in the history
  • Loading branch information
MatsJohansen87 committed Jan 16, 2024
1 parent 464780a commit a2239db
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/demo/src/AppCCP.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ const barChartBackgroundColors: string[] = ["#4dc9f6","#3da4c7"];
/>
</div>
<div class="chart-wrapper result-table">
<lens-result-table pageSize="10" >
<lens-result-table pageSize="4" >
<div slot="above-pagination" class="result-table-hint-text">
* Umfasst Gewebe- und flüssige Proben. Die Anzahl der FFPE Proben (Schätzung) entspricht der Zahl der Diagnosen
</div>
Expand Down
12 changes: 11 additions & 1 deletion packages/demo/src/styles/default/result-table.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,20 @@ lens-result-table {
}

lens-result-table::part(table-pagination-button) {
border: solid 1px var(--gray);
border: solid 1px var(--blue);
background: var(--white);
border-radius: var(--border-radius-small);
padding: var(--gap-xxs) var(--gap-s);
cursor: pointer;
}


lens-result-table::part(pagination-button-disabled) {
border: solid 1px var(--light-gray);
background: var(--white);
border-radius: var(--border-radius-small);
padding: var(--gap-xxs) var(--gap-s);
cursor: auto;
}

lens-result-table::part(info-button) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,16 +212,18 @@
<slot name="above-pagination"/>
<div part="table-pagination">
<button
part="table-pagination-button pagination-pagination-previous"
part="table-pagination-button pagination-pagination-previous
{activePage === 1 ? 'pagination-button-disabled' : ''}"
disabled={activePage === 1}
on:click={() => {
activePage = activePage - 1;
}}>&#8592;</button
>
<div part="table-pagination-pagenumber">{activePage}</div>
<button
part="table-pagination-button pagination-pagination-next"
disabled={activePage === Math.ceil(tableRowData.length / pageSize)}
part="table-pagination-button pagination-pagination-next
{activePage === Math.ceil(tableRowData.length / pageSize) || pageItems.length === 0 ? 'pagination-button-disabled' : ''}"
disabled={activePage === Math.ceil(tableRowData.length / pageSize)|| pageItems.length === 0}
on:click={() => {
activePage = activePage + 1;
}}>&#8594;</button
Expand Down

0 comments on commit a2239db

Please sign in to comment.