From 0f8fd5edeb550064d5f066c36b8de4b6c4b238c1 Mon Sep 17 00:00:00 2001 From: mahdi Date: Tue, 3 May 2022 18:33:16 +0430 Subject: [PATCH] update src/components/AnimatedProgressBar/index.js, src/components/CardTrelloDesign/index.js and src/components/ProductSalesAmount/Design2/index.js --- src/components/AnimatedProgressBar/index.js | 14 +++++++++++++- src/components/CardTrelloDesign/index.js | 4 ++-- src/components/ProductSalesAmount/Design2/index.js | 14 ++------------ 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/components/AnimatedProgressBar/index.js b/src/components/AnimatedProgressBar/index.js index 23bceab..54f6d38 100644 --- a/src/components/AnimatedProgressBar/index.js +++ b/src/components/AnimatedProgressBar/index.js @@ -12,7 +12,7 @@ const AnimatedProgressBar = ({ rangeWidth, parentBg, childBg }) => { return (
@@ -26,3 +26,15 @@ AnimatedProgressBar.defaultProps = { parentBg: "bg-gray-200", childBg: "bg-gray-600", }; + +// const [rangePercent, setRangePercent] = useState(55); + +// w-[${ +// rangePercent + "%" +// }] + +// className={ +// "h-full bg-gray-300 " + +// `${rangePercent ? "w-[" + rangePercent + "%]" : ""}` +// } +// className={'h-full bg-gray-300"+ `${rangePercent ? 'w-[' + rangePercent + '%]' : ''}`} diff --git a/src/components/CardTrelloDesign/index.js b/src/components/CardTrelloDesign/index.js index 7d43f10..42683ba 100644 --- a/src/components/CardTrelloDesign/index.js +++ b/src/components/CardTrelloDesign/index.js @@ -114,8 +114,8 @@ const CardTrelloDesign = ({ {/* progressBar */} diff --git a/src/components/ProductSalesAmount/Design2/index.js b/src/components/ProductSalesAmount/Design2/index.js index 1a9e86f..71d7b63 100644 --- a/src/components/ProductSalesAmount/Design2/index.js +++ b/src/components/ProductSalesAmount/Design2/index.js @@ -1,18 +1,10 @@ -import React, { useEffect, useState } from "react"; +import React from "react"; import AnimatedProgressBar from "../../AnimatedProgressBar"; import TitleSubtitle from "../../TitleSubtitle"; import ellipse from "./Ellipse.svg"; -const Design2 = ({ title, incomes }) => { - const [progressFlag, setProgressFlag] = useState(false); - - useEffect(() => { - setTimeout(() => { - setProgressFlag(true); - }, 100); - }, []); - +const Design2 = ({ incomes }) => { return (
{/* title */} @@ -32,8 +24,6 @@ const Design2 = ({ title, incomes }) => { export default Design2; Design2.defaultProps = { - title: "میزان فروش محصولات", - incomes: [ { image: ellipse,