Skip to content

Commit

Permalink
Merge pull request #479 from huwshimi/remove-arrow-components
Browse files Browse the repository at this point in the history
WD-17046 - refactor: replace icon components with standard icons
BarcoMasile authored Nov 25, 2024
2 parents a524cd8 + 7d55015 commit 933f307
Showing 3 changed files with 5 additions and 21 deletions.
7 changes: 0 additions & 7 deletions ui/src/components/IconLeft.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions ui/src/components/IconRight.tsx

This file was deleted.

12 changes: 5 additions & 7 deletions ui/src/components/Pagination/Pagination.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import React, { FC } from "react";
import { PaginatedResponse } from "types/api";
import { Button } from "@canonical/react-components";
import { Button, Icon } from "@canonical/react-components";
import { usePagination } from "util/usePagination";
import IconLeft from "components/IconLeft";
import IconRight from "components/IconRight";

interface Props {
response?: PaginatedResponse<unknown[]>;
@@ -26,18 +24,18 @@ const Pagination: FC<Props> = ({ response }) => {
<>
{showFirstLink && (
<Button onClick={() => setPageToken("")} title="First page">
<IconLeft />
<IconLeft />
<Icon name="chevron-left" />
<Icon name="chevron-left" />
</Button>
)}
{prev && (
<Button onClick={() => setPageToken(prev)} title="Previous page">
<IconLeft />
<Icon name="chevron-left" />
</Button>
)}
{next && (
<Button onClick={() => setPageToken(next)} title="Next page">
<IconRight />
<Icon name="chevron-right" />
</Button>
)}
</>

0 comments on commit 933f307

Please sign in to comment.