Skip to content

Commit 74aec5d

Browse files
authored
Fix pagination buttons having no horizontal padding (#2743)
1 parent 3af94ca commit 74aec5d

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

frontend/src/components/ui/navigation/navigation-button.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,11 @@ export class NavigationButton extends TailwindElement {
3939
@property({ type: Boolean })
4040
disabled = false;
4141

42-
@property({ type: Boolean })
43-
icon = false;
44-
4542
@property({ type: String, reflect: true })
4643
role: ARIAMixin["role"] = null;
4744

4845
@property({ type: String })
49-
size: "small" | "medium" | "large" = "medium";
46+
size: "x-small" | "small" | "medium" | "large" = "medium";
5047

5148
@property({ type: String })
5249
align: "left" | "center" | "right" = "left";
@@ -82,10 +79,9 @@ export class NavigationButton extends TailwindElement {
8279
part="button"
8380
class=${clsx([
8481
tw`flex w-full cursor-pointer items-center gap-2 rounded font-medium leading-[16px] transition hover:transition-none focus-visible:outline focus-visible:outline-3 focus-visible:outline-offset-1 disabled:cursor-not-allowed disabled:bg-transparent disabled:opacity-50`,
85-
86-
this.icon ? tw`min-h-6 min-w-6` : tw``,
8782
{
88-
small: this.icon ? tw`min-h-6 p-0` : tw`min-h-6 px-2 py-0`,
83+
"x-small": tw`min-size-6 px-1 py-0`,
84+
small: tw`min-h-6 px-2 py-0`,
8985
medium: tw`p-2`,
9086
large: tw`px-2 py-4`,
9187
}[this.size],

frontend/src/components/ui/pagination.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,8 @@ export class Pagination extends LitElement {
370370
const isCurrent = page === this._page;
371371
return html`<li aria-current=${ifDefined(isCurrent ? "page" : undefined)}>
372372
<btrix-navigation-button
373-
icon
374373
.active=${isCurrent}
375-
.size=${"small"}
374+
.size=${"x-small"}
376375
.align=${"center"}
377376
@click=${() => this.onPageChange(page)}
378377
aria-disabled=${isCurrent}

0 commit comments

Comments
 (0)