Skip to content

Commit

Permalink
add element list to pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
miarkt committed Oct 25, 2023
1 parent c14d5c2 commit ae207ff
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions client/src/pages/directory/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,22 @@ const letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm'
function Filter({ selectedLetter, setSelectedLetterHandler }) {
return (
<Row gutters>
<Col n="12" className="fr-mt-3w text-center">
{letters.map((letter) => (
<button
key={`${letter}-key`}
onClick={() => setSelectedLetterHandler(letter)}
style={(letter === selectedLetter) ? { fontWeight: 'bold', textDecoration: 'underline' } : null}
aria-current={(letter === selectedLetter)}
type="button"
>
<Text>{letter}</Text>
</button>
))}
<Col n="12" className="fr-mt-3w text-center d-inline">
<ul className="d-inline">
{letters.map((letter) => (
<li className="d-inline">
<button
key={`${letter}-key`}
onClick={() => setSelectedLetterHandler(letter)}
style={(letter === selectedLetter) ? { fontWeight: 'bold', textDecoration: 'underline' } : null}
aria-current={(letter === selectedLetter)}
type="button"
>
<Text>{letter}</Text>
</button>
</li>
))}
</ul>
</Col>
</Row>
);
Expand Down

0 comments on commit ae207ff

Please sign in to comment.