From e94f01529be5d93b178fa9efd9af81ea89c2ceb9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Dombya?=
<135591453+hervedombya@users.noreply.github.com>
Date: Fri, 13 Oct 2023 16:59:56 +0200
Subject: [PATCH] review fixes
---
src/lib/components/toast/Toast.component.tsx | 4 ++--
src/lib/components/toast/ToastPositionHelpers.ts | 4 +++-
src/lib/components/toast/ToastProgressBar.tsx | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/lib/components/toast/Toast.component.tsx b/src/lib/components/toast/Toast.component.tsx
index 191e6b9250..1b68f36262 100644
--- a/src/lib/components/toast/Toast.component.tsx
+++ b/src/lib/components/toast/Toast.component.tsx
@@ -6,7 +6,7 @@ import { Button } from '../buttonv2/Buttonv2.component';
import { Icon, IconColor } from '../icon/Icon.component';
import { BasicText } from '../text/Text.component';
import { ToastPosition, positionOutput } from './ToastPositionHelpers';
-import { ToastProgressBar } from './ToastProgressBar';
+import { DurationBasedProgressBar } from './ToastProgressBar';
import { useToastParameters } from './useToastParameters';
import styled from 'styled-components';
@@ -168,7 +168,7 @@ function Toast({
{withProgressBar && (
-
diff --git a/src/lib/components/toast/ToastPositionHelpers.ts b/src/lib/components/toast/ToastPositionHelpers.ts
index a087e3b415..5e1808c1b9 100644
--- a/src/lib/components/toast/ToastPositionHelpers.ts
+++ b/src/lib/components/toast/ToastPositionHelpers.ts
@@ -1,3 +1,5 @@
+import { CSSProperties } from 'react';
+
export type ToastPosition =
| 'top-left'
| 'top-right'
@@ -6,7 +8,7 @@ export type ToastPosition =
| 'bottom-right'
| 'bottom-center';
-export const positionOutput: Record = {
+export const positionOutput: Record = {
'top-left': {
top: '3rem',
left: '1rem',
diff --git a/src/lib/components/toast/ToastProgressBar.tsx b/src/lib/components/toast/ToastProgressBar.tsx
index 95db71b90f..35f2776557 100644
--- a/src/lib/components/toast/ToastProgressBar.tsx
+++ b/src/lib/components/toast/ToastProgressBar.tsx
@@ -2,7 +2,7 @@ import { darken } from 'polished';
import { useEffect, useState } from 'react';
import { ProgressBar } from '../progressbar/ProgressBar.component';
-export function ToastProgressBar({
+export function DurationBasedProgressBar({
duration,
color,
}: {