-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds synonyms moderation front end (#2538)
Resolves #2116.
- Loading branch information
Showing
9 changed files
with
810 additions
and
176 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/*! | ||
* Copyright © 2023 United States Government as represented by the | ||
* Administrator of the National Aeronautics and Space Administration. | ||
* All Rights Reserved. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import { useSubmit } from '@remix-run/react' | ||
import { Select } from '@trussworks/react-uswds' | ||
|
||
import Pagination from './Pagination' | ||
|
||
export default function PaginationSelectionFooter({ | ||
page, | ||
totalPages, | ||
limit, | ||
query, | ||
form, | ||
}: { | ||
page: number | ||
totalPages: number | ||
limit?: number | ||
query?: string | ||
form: string | ||
}) { | ||
const submit = useSubmit() | ||
return ( | ||
<div className="display-flex flex-row flex-wrap"> | ||
<div className="display-flex flex-align-self-center margin-right-2 width-auto"> | ||
<div> | ||
<Select | ||
id="limit" | ||
title="Number of results per page" | ||
className="width-auto height-5 padding-y-0 margin-y-0" | ||
name="limit" | ||
defaultValue="100" | ||
form={form} | ||
onChange={({ target: { form } }) => { | ||
submit(form) | ||
}} | ||
> | ||
<option value="10">10 / page</option> | ||
<option value="20">20 / page</option> | ||
<option value="50">50 / page</option> | ||
<option value="100">100 / page</option> | ||
</Select> | ||
</div> | ||
</div> | ||
<div className="display-flex flex-fill"> | ||
{totalPages > 1 && ( | ||
<Pagination | ||
query={query} | ||
page={page} | ||
limit={limit} | ||
totalPages={totalPages} | ||
/> | ||
)} | ||
</div> | ||
</div> | ||
) | ||
} |
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
Oops, something went wrong.