diff --git a/apps/docs/content/3-components/2-library/pagination.mdx b/apps/docs/content/3-components/2-library/pagination.mdx
index 9a231cebb..bba2db0bb 100644
--- a/apps/docs/content/3-components/2-library/pagination.mdx
+++ b/apps/docs/content/3-components/2-library/pagination.mdx
@@ -44,22 +44,24 @@ libraries:
data-total-pages="10"
data-testid="govie-pagination"
data-module="gieds-pagination"
- >
+ >
- arrow_left_alt
- Previous
+ arrow_left_alt Previous
- Page 5 of 10
+ Page 5 of 10
-
+
```
diff --git a/apps/docs/dictionary.txt b/apps/docs/dictionary.txt
index 5c0117ab4..092eeb835 100644
--- a/apps/docs/dictionary.txt
+++ b/apps/docs/dictionary.txt
@@ -122,4 +122,8 @@ itemsDistribution
fixedHeight
groupId
hideToc
-Dismissible
\ No newline at end of file
+Dismissible
+gi-pagination-next-btn
+gi-btn
+gi-btn-flat-dark
+gi-btn-large
diff --git a/packages/design/tailwind/css/components.css b/packages/design/tailwind/css/components.css
index da4c45b26..33349bfd6 100644
--- a/packages/design/tailwind/css/components.css
+++ b/packages/design/tailwind/css/components.css
@@ -904,10 +904,21 @@ input[type='file' i] {
}
/* End of Toast */
+
/* Pagination */
.gi-pagination {
- @apply gi-flex xs:gi-justify-center gi-justify-between gi-items-center gi-gap-2;
+ @apply gi-flex xs:gi-justify-center gi-justify-between gi-items-center gi-gap-2;
}
+@media (max-width: 640px) {
+ .gi-pagination-next-btn,
+ .gi-pagination-prev-btn {
+ padding: var(--gieds-space-3);
+ height: var(--gieds-space-12);
+ width: var(--gieds-space-12);
+ justify-content: center;
+ }
+}
/* End of Pagination */
+
diff --git a/packages/html/ds/src/button/button.html b/packages/html/ds/src/button/button.html
index 2f87649bd..f84a0dec5 100644
--- a/packages/html/ds/src/button/button.html
+++ b/packages/html/ds/src/button/button.html
@@ -6,6 +6,10 @@
{% set size = props.size or 'medium' %}
{% set isDisabled = 'disabled' if props.disabled else 'notDisabled' %}
{% set testId = props.testId or 'govieButton-' ~ appearance ~ '-' ~ variant ~ '-' ~ size ~ '-' ~ isDisabled %}
+ {% set commonClasses = getVariantAppearanceClass(props.disabled, props.variant, props.appearance) | trim %}
+ {% set sizeClasses = getSizeClass(props.size) | trim %}
+ {% set disabledClasses = isButtonDisabled(props.disabled, props.variant, props.appearance) | trim %}
+ {% set allClasses = (props.className or '') ~ ' ' ~ 'gi-btn ' ~ commonClasses ~ ' ' ~ sizeClasses ~ ' ' ~ disabledClasses %}
{% if props.href %}
{{ props.content | safe | trim }}
@@ -32,7 +36,7 @@
data-testid="{{ testId }}"
data-element="button-container"
data-module="gieds-button"
- class="gi-btn {{ getVariantAppearanceClass(props.disabled, props.variant, props.appearance) | trim }} {{ getSizeClass(props.size) | trim }} {{ isButtonDisabled(props.disabled, props.variant, props.appearance) | trim }}"
+ class="{{ allClasses | trim }}"
>
{{ props.content | safe | trim }}
diff --git a/packages/html/ds/src/pagination/pagination.html b/packages/html/ds/src/pagination/pagination.html
index b0ce9428d..668bf9616 100644
--- a/packages/html/ds/src/pagination/pagination.html
+++ b/packages/html/ds/src/pagination/pagination.html
@@ -18,7 +18,8 @@
"href": "#",
"target": "_self",
"testId": "govie-pagination-prev-btn",
- "data-current-page": props.currentPage - 1
+ "data-current-page": props.currentPage - 1,
+ "className": "gi-pagination-prev-btn"
})
}}
@@ -41,7 +42,8 @@
"target": "_self",
"disabled": props.currentPage == props.totalPages,
"testId": "govie-pagination-next-btn",
- "data-current-page": props.currentPage + 1
+ "data-current-page": props.currentPage + 1,
+ "className": "gi-pagination-next-btn"
})
}}
diff --git a/packages/react/ds/src/pagination/pagination.tsx b/packages/react/ds/src/pagination/pagination.tsx
index 47d80933a..78d047d0e 100644
--- a/packages/react/ds/src/pagination/pagination.tsx
+++ b/packages/react/ds/src/pagination/pagination.tsx
@@ -18,8 +18,8 @@ export const Pagination: React.FC = ({
onPageChange,
}) => {
const { breakpoint, width } = useBreakpoint();
- const isCompactView = breakpoint === Breakpoint.XS; // Custom breakpoint for compact view.
- const showLabel = width < 639;
+ const isCompactView = breakpoint === Breakpoint.XS;
+ const isSMWidth = width < 639;
const displayedPages = getDisplayPages(currentPage, totalPages, breakpoint);
@@ -57,11 +57,12 @@ export const Pagination: React.FC = ({
appearance="dark"
disabled={currentPage === 1}
onClick={() => onPageChange(currentPage - 1)}
+ className={isSMWidth ? 'gi-icon-btn-large' : ''}
>
- {!showLabel && 'Previous'}
+ {!isSMWidth && 'Previous'}
{isCompactView ? renderPaginationLabel() : renderPaginationBtns()}
@@ -72,8 +73,9 @@ export const Pagination: React.FC = ({
size="large"
appearance="dark"
onClick={() => onPageChange(currentPage + 1)}
+ className={isSMWidth ? 'gi-icon-btn-large' : ''}
>
- {!showLabel && 'Next'}
+ {!isSMWidth && 'Next'}