Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced all the css into tailwind css on Pagination component #1763

Merged
merged 2 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions components/Pagination/Pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import LeftAngleIcon from 'static/images/icons/FontAwesome/angle-left-solid.svg'
import RightAngleIcon from 'static/images/icons/FontAwesome/angle-right-solid.svg';
import { PREV_PAGE_BUTTON, NEXT_PAGE_BUTTON } from '../../common/constants/testIDs';
import PaginationItem from './PaginationItem/PaginationItem';
import styles from './Pagination.module.css';

Pagination.propTypes = {
currentPage: number.isRequired,
Expand Down Expand Up @@ -147,7 +146,10 @@ function Pagination({ currentPage, pathname, query, totalPages }) {
}

return (
<nav className={styles.Pagination} data-testid="Pagination">
<nav
className={'[&>ol]:flex my-0 mx-auto p-0 justify-between items-center max-w-fit"'}
subhajit20 marked this conversation as resolved.
Show resolved Hide resolved
data-testid="Pagination"
>
<ol>
{currentPage > 1 && (
<PaginationItem
Expand All @@ -156,7 +158,7 @@ function Pagination({ currentPage, pathname, query, totalPages }) {
query={query}
testId={PREV_PAGE_BUTTON}
>
<LeftAngleIcon className={styles.icon} />
<LeftAngleIcon className="w-full" />
</PaginationItem>
)}

Expand All @@ -174,7 +176,7 @@ function Pagination({ currentPage, pathname, query, totalPages }) {
query={query}
testId={NEXT_PAGE_BUTTON}
>
<RightAngleIcon className={styles.icon} />
<RightAngleIcon className="w-full" />
</PaginationItem>
)}
</ol>
Expand Down
12 changes: 0 additions & 12 deletions components/Pagination/Pagination.module.css

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exports[`PaginationItem renders correctly as a current item with value 1`] = `
onMouseEnter={[Function]}
>
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Go to page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`Pagination should render with required props 1`] = `
<nav
className="Pagination"
className="[&>ol]:flex my-0 mx-auto p-0 justify-between items-center max-w-fit\\""
data-testid="Pagination"
>
<ol>
Expand All @@ -17,7 +17,7 @@ exports[`Pagination should render with required props 1`] = `
onMouseEnter={[Function]}
>
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Go to page
Expand All @@ -36,7 +36,7 @@ exports[`Pagination should render with required props 1`] = `
onMouseEnter={[Function]}
>
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Go to page
Expand All @@ -55,7 +55,7 @@ exports[`Pagination should render with required props 1`] = `
onMouseEnter={[Function]}
>
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Go to page
Expand All @@ -74,7 +74,7 @@ exports[`Pagination should render with required props 1`] = `
onMouseEnter={[Function]}
>
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Go to page
Expand All @@ -93,7 +93,7 @@ exports[`Pagination should render with required props 1`] = `
onMouseEnter={[Function]}
>
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Go to page
Expand All @@ -112,7 +112,7 @@ exports[`Pagination should render with required props 1`] = `
onMouseEnter={[Function]}
>
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Go to page
Expand All @@ -131,7 +131,7 @@ exports[`Pagination should render with required props 1`] = `
onMouseEnter={[Function]}
>
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Go to page
Expand All @@ -150,7 +150,7 @@ exports[`Pagination should render with required props 1`] = `
onMouseEnter={[Function]}
>
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Go to page
Expand All @@ -169,7 +169,7 @@ exports[`Pagination should render with required props 1`] = `
onMouseEnter={[Function]}
>
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Go to page
Expand All @@ -194,7 +194,7 @@ exports[`Pagination should render with required props 1`] = `
onMouseEnter={[Function]}
>
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Go to page
Expand All @@ -213,13 +213,13 @@ exports[`Pagination should render with required props 1`] = `
onMouseEnter={[Function]}
>
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Go to page
</span>
<svg
className="icon"
className="w-full"
/>
</a>
</li>
Expand Down