From 9128c224c65f8f2a172b22a443ccb4573c7acd90 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 29 Sep 2023 15:49:14 +0200
Subject: refactor(components): rewrite ProgressBar component

* Avoid browser vendors by adding an extra div
* Add a loading state
* Add an option to center the progress bar (no longer the default)
* Remove min since it is always 0
---
 src/components/atoms/loaders/progress-bar.tsx | 57 ---------------------------
 1 file changed, 57 deletions(-)
 delete mode 100644 src/components/atoms/loaders/progress-bar.tsx

(limited to 'src/components/atoms/loaders/progress-bar.tsx')

diff --git a/src/components/atoms/loaders/progress-bar.tsx b/src/components/atoms/loaders/progress-bar.tsx
deleted file mode 100644
index 195bb21..0000000
--- a/src/components/atoms/loaders/progress-bar.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import { FC } from 'react';
-import styles from './progress-bar.module.scss';
-
-export type ProgressBarProps = {
-  /**
-   * Current value.
-   */
-  current: number;
-  /**
-   * The progress bar id.
-   */
-  id: string;
-  /**
-   * The progress bar label.
-   */
-  label: string;
-  /**
-   * Minimal value.
-   */
-  min: number;
-  /**
-   * Maximal value.
-   */
-  max: number;
-};
-
-/**
- * ProgressBar component
- *
- * Render a progress bar.
- */
-export const ProgressBar: FC<ProgressBarProps> = ({
-  current,
-  id,
-  label,
-  min,
-  max,
-}) => {
-  return (
-    <div className={styles.progress}>
-      <label htmlFor={id} className={styles.progress__info}>
-        {label}
-      </label>
-      <progress
-        aria-valuemin={min}
-        aria-valuemax={max}
-        aria-valuenow={current}
-        className={styles.progress__bar}
-        id={id}
-        max={max}
-        value={current}
-      >
-        {current}/{max}
-      </progress>
-    </div>
-  );
-};
-- 
cgit v1.2.3

