aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/PaginationCursor/PaginationCursor.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/PaginationCursor/PaginationCursor.tsx')
-rw-r--r--src/components/PaginationCursor/PaginationCursor.tsx30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/components/PaginationCursor/PaginationCursor.tsx b/src/components/PaginationCursor/PaginationCursor.tsx
new file mode 100644
index 0000000..bcbb555
--- /dev/null
+++ b/src/components/PaginationCursor/PaginationCursor.tsx
@@ -0,0 +1,30 @@
+import { plural, t } from '@lingui/macro';
+import styles from './PaginationCursor.module.scss';
+
+const PaginationCursor = ({
+ current,
+ total,
+}: {
+ current: number;
+ total: number;
+}) => {
+ return (
+ <div className={styles.wrapper}>
+ <progress
+ className={styles.bar}
+ max={total}
+ value={current}
+ aria-valuemin={0}
+ aria-valuemax={total}
+ aria-label={t`Number of articles loaded out of the total available.`}
+ title={plural(current, {
+ zero: `# articles out of a total of ${total}`,
+ one: `# article out of a total of ${total}`,
+ other: `# articles out of a total of ${total}`,
+ })}
+ ></progress>
+ </div>
+ );
+};
+
+export default PaginationCursor;