From 687721b2d554639cebfe88d0e280bcb16ebfa64b Mon Sep 17 00:00:00 2001 From: ynhhoJ <22500212+ynhhoJ@users.noreply.github.com> Date: Mon, 6 Jan 2025 14:55:42 +0200 Subject: [PATCH] feat(Pager): Add previous / next key icons --- src/components/Pager.tsx | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/src/components/Pager.tsx b/src/components/Pager.tsx index 7527194..ef80173 100644 --- a/src/components/Pager.tsx +++ b/src/components/Pager.tsx @@ -7,25 +7,35 @@ export const Pager: React.FC<{ onPrev: () => void; hasNext: boolean; hasPrev: boolean; -}> = (props) => { + prevKey?: "l2"; + nextKey?: "r2"; +}> = ({ currentText, prevKey, hasNext, hasPrev, onNext, onPrev, nextKey }) => { return ( + {prevKey && ( + {prevKey} + )} + < -
{props.currentText}
+
{currentText}
> + + {nextKey && ( + {nextKey} + )}
); };