Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Pagination): migrate to tailwind
- Loading branch information
1 parent
22464a6
commit c440d74
Showing
29 changed files
with
90 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
packages/orbit-components/src/Pagination/Pagination.ct-story.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import * as React from "react"; | ||
|
||
import Pagination from "."; | ||
|
||
export default function PaginationStory() { | ||
return ( | ||
<div className="p-md"> | ||
<Pagination | ||
labelNext="Previous" | ||
labelPrev="Next" | ||
labelProgress="1 of 6" | ||
onPageChange={() => {}} | ||
pageCount={6} | ||
/> | ||
<Pagination | ||
labelNext="Previous" | ||
labelPrev="Next" | ||
labelProgress="1 of 6" | ||
onPageChange={() => {}} | ||
pageCount={6} | ||
size="small" | ||
/> | ||
<Pagination | ||
hideLabels={false} | ||
labelNext="Previous" | ||
labelPrev="Next" | ||
labelProgress="1 of 6" | ||
onPageChange={() => {}} | ||
pageCount={6} | ||
size="small" | ||
/> | ||
<Pagination | ||
labelNext="Next" | ||
labelPrev="Previous" | ||
labelProgress="44 of 100" | ||
onPageChange={() => {}} | ||
pageCount={100} | ||
selectedPage={44} | ||
/> | ||
<Pagination | ||
hideLabels={false} | ||
labelNext="Next" | ||
labelPrev="Previous" | ||
labelProgress="100 of 100" | ||
onPageChange={() => {}} | ||
pageCount={100} | ||
selectedPage={100} | ||
/> | ||
</div> | ||
); | ||
} |
23 changes: 23 additions & 0 deletions
23
packages/orbit-components/src/Pagination/Pagination.ct.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import * as React from "react"; | ||
import { test, expect } from "@playwright/experimental-ct-react"; | ||
|
||
import PaginationStory from "./Pagination.ct-story"; | ||
import RenderInRtl from "../utils/rtl/RenderInRtl"; | ||
|
||
test.describe("visual Pagination", () => { | ||
test("default", async ({ mount }) => { | ||
const component = await mount(<PaginationStory />); | ||
|
||
await expect(component).toHaveScreenshot(); | ||
}); | ||
|
||
test("rtl", async ({ mount }) => { | ||
const component = await mount( | ||
<RenderInRtl> | ||
<PaginationStory /> | ||
</RenderInRtl>, | ||
); | ||
|
||
await expect(component).toHaveScreenshot(); | ||
}); | ||
}); |
Binary file added
BIN
+16.2 KB
...tion/Pagination.ct.tsx-snapshots/visual-Pagination-default-1-Desktop-darwin.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15 KB
...ation/Pagination.ct.tsx-snapshots/visual-Pagination-default-1-Desktop-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.6 KB
...agination.ct.tsx-snapshots/visual-Pagination-default-1-Large-Desktop-darwin.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.3 KB
...Pagination.ct.tsx-snapshots/visual-Pagination-default-1-Large-Desktop-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.4 KB
...Pagination.ct.tsx-snapshots/visual-Pagination-default-1-Large-Mobile-darwin.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.4 KB
.../Pagination.ct.tsx-snapshots/visual-Pagination-default-1-Large-Mobile-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.69 KB
...agination.ct.tsx-snapshots/visual-Pagination-default-1-Medium-Mobile-darwin.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.19 KB
...Pagination.ct.tsx-snapshots/visual-Pagination-default-1-Medium-Mobile-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.16 KB
...Pagination.ct.tsx-snapshots/visual-Pagination-default-1-Small-Mobile-darwin.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.23 KB
.../Pagination.ct.tsx-snapshots/visual-Pagination-default-1-Small-Mobile-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+19.2 KB
...ation/Pagination.ct.tsx-snapshots/visual-Pagination-default-1-Tablet-darwin.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13.4 KB
...nation/Pagination.ct.tsx-snapshots/visual-Pagination-default-1-Tablet-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.5 KB
...gination/Pagination.ct.tsx-snapshots/visual-Pagination-rtl-1-Desktop-darwin.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.9 KB
...agination/Pagination.ct.tsx-snapshots/visual-Pagination-rtl-1-Desktop-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.9 KB
...on/Pagination.ct.tsx-snapshots/visual-Pagination-rtl-1-Large-Desktop-darwin.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.2 KB
...ion/Pagination.ct.tsx-snapshots/visual-Pagination-rtl-1-Large-Desktop-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.3 KB
...ion/Pagination.ct.tsx-snapshots/visual-Pagination-rtl-1-Large-Mobile-darwin.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.29 KB
...tion/Pagination.ct.tsx-snapshots/visual-Pagination-rtl-1-Large-Mobile-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.59 KB
...on/Pagination.ct.tsx-snapshots/visual-Pagination-rtl-1-Medium-Mobile-darwin.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.1 KB
...ion/Pagination.ct.tsx-snapshots/visual-Pagination-rtl-1-Medium-Mobile-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.99 KB
...ion/Pagination.ct.tsx-snapshots/visual-Pagination-rtl-1-Small-Mobile-darwin.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.15 KB
...tion/Pagination.ct.tsx-snapshots/visual-Pagination-rtl-1-Small-Mobile-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+19.5 KB
...agination/Pagination.ct.tsx-snapshots/visual-Pagination-rtl-1-Tablet-darwin.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13.3 KB
...Pagination/Pagination.ct.tsx-snapshots/visual-Pagination-rtl-1-Tablet-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 9 additions & 38 deletions
47
packages/orbit-components/src/Pagination/components/ActiveButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters