Skip to content

Commit 336cd81

Browse files
authored
Merge pull request #1359 from dxc-technology/aida-fix-1358
Fixed margins between elements in paginator
2 parents 47ce41d + dd221b1 commit 336cd81

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed

docs/src/pages/themeBuilder/themes/AdvancedTheme.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,10 +498,10 @@
498498
"marginRight": "40px",
499499
"marginLeft": "20px",
500500
"itemsPerPageSelectorMarginLeft": "0px",
501-
"itemsPerPageSelectorMarginRight": "30px",
501+
"itemsPerPageSelectorMarginRight": "0.5rem",
502502
"pageSelectorMarginRight": "30px",
503503
"pageSelectorMarginLeft": "0px",
504-
"totalItemsContainerMarginRight": "30px",
504+
"totalItemsContainerMarginRight": "2.5rem",
505505
"totalItemsContainerMarginLeft": "0px"
506506
},
507507
"progressBar": {

lib/src/common/variables.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,13 @@ export const componentTokens = {
192192
titleLabelFontWeight: globalTokens.type_regular,
193193
titleLabelFontStyle: globalTokens.type_normal,
194194
titleLabelFontColor: globalTokens.hal_black,
195-
disabledTitleLabelFontColor: globalTokens.hal_grey_l_60,
196-
titleLabelPaddingTop: "0px",
197-
titleLabelPaddingBottom: "0px",
198-
titleLabelPaddingLeft: "0px",
199-
titleLabelPaddingRight: "16px",
200-
focusBorderColor: globalTokens.hal_blue_l_50,
201-
focusBorderStyle: "solid",
195+
disabledTitleLabelFontColor: globalTokens.hal_grey_l_60,
196+
titleLabelPaddingTop: "0px",
197+
titleLabelPaddingBottom: "0px",
198+
titleLabelPaddingLeft: "0px",
199+
titleLabelPaddingRight: "16px",
200+
focusBorderColor: globalTokens.hal_blue_l_50,
201+
focusBorderStyle: "solid",
202202
focusBorderThickness: "2px",
203203
borderRadius: "4px",
204204
boxShadowOffsetX: "0px",
@@ -781,13 +781,13 @@ export const componentTokens = {
781781
fontTextTransform: "none",
782782
verticalPadding: "0.75rem",
783783
horizontalPadding: "2rem",
784-
marginRight: "2rem",
785-
marginLeft: "2rem",
784+
marginRight: "40px",
785+
marginLeft: "20px",
786786
itemsPerPageSelectorMarginLeft: "0px",
787-
itemsPerPageSelectorMarginRight: "1rem",
787+
itemsPerPageSelectorMarginRight: "0.5rem",
788788
pageSelectorMarginRight: "30px",
789789
pageSelectorMarginLeft: "0px",
790-
totalItemsContainerMarginRight: "3rem",
790+
totalItemsContainerMarginRight: "2.5rem",
791791
totalItemsContainerMarginLeft: "0px",
792792
},
793793
progressBar: {
@@ -1470,7 +1470,7 @@ export const defaultTranslatedComponentLabels = {
14701470
incrementValueTitle: "Increment value",
14711471
},
14721472
paginator: {
1473-
itemsPerPageText: "Items per page ",
1473+
itemsPerPageText: "Items per page: ",
14741474
minToMaxOfText: (minNumberOfItems, maxNumberOfItems, totalItems) =>
14751475
`${minNumberOfItems} to ${maxNumberOfItems} of ${totalItems}`,
14761476
goToPageText: "Go to page:",

lib/src/paginator/Paginator.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe("Paginator component tests", () => {
3535
const { getByText } = render(
3636
<DxcPaginator currentPage={1} itemsPerPage={10} itemsPerPageOptions={[10, 15]} totalItems={20}></DxcPaginator>
3737
);
38-
expect(getByText("Items per page")).toBeTruthy();
38+
expect(getByText("Items per page:")).toBeTruthy();
3939
});
4040

4141
test("Paginator renders with itemsPerPageOptions", () => {

lib/src/paginator/Paginator.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ const ItemsLabel = styled.span`
174174

175175
const GoToLabel = styled.span`
176176
margin-right: 0.5rem;
177-
margin-left: 1rem;
177+
margin-left: 0.5rem;
178178
`;
179179

180180
const TotalItemsContainer = styled.span`
@@ -193,6 +193,7 @@ const LabelsContainer = styled.div`
193193
const PageToSelectContainer = styled.span`
194194
display: flex;
195195
align-items: center;
196+
margin-right: 0.5rem;
196197
197198
label {
198199
height: 0px;

0 commit comments

Comments
 (0)