From 6b343c2c77e2ebc1075bb14227a3606e4cbe9517 Mon Sep 17 00:00:00 2001 From: mahdi andalib Date: Sun, 30 Jan 2022 16:19:59 +0330 Subject: [PATCH] update --- src/App.js | 6 +- .../Design1/home-trend-down.svg | 8 +++ .../Design1/home-trend-up.svg | 6 ++ .../ProductSalesAmount/Design1/index.js | 64 +++++++++++++++++++ 4 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 src/components/ProductSalesAmount/Design1/home-trend-down.svg create mode 100644 src/components/ProductSalesAmount/Design1/home-trend-up.svg create mode 100644 src/components/ProductSalesAmount/Design1/index.js diff --git a/src/App.js b/src/App.js index 6a2b316..4b38380 100644 --- a/src/App.js +++ b/src/App.js @@ -40,6 +40,7 @@ import SimpleBarChart from "./components/Chart/SimpleBarChart"; import Switch from "./components/Switch"; import SpecifiedDomainRadarChart from "./components/Chart/SpecifiedDomainRadarChart"; +import Design1 from "./components/ProductSalesAmount/Design1"; function App() { return ( @@ -78,8 +79,9 @@ function App() { {/* */} {/* */} {/* */} - - + {/* */} + {/* */} + ); diff --git a/src/components/ProductSalesAmount/Design1/home-trend-down.svg b/src/components/ProductSalesAmount/Design1/home-trend-down.svg new file mode 100644 index 0000000..a487fe1 --- /dev/null +++ b/src/components/ProductSalesAmount/Design1/home-trend-down.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/components/ProductSalesAmount/Design1/home-trend-up.svg b/src/components/ProductSalesAmount/Design1/home-trend-up.svg new file mode 100644 index 0000000..5b733f0 --- /dev/null +++ b/src/components/ProductSalesAmount/Design1/home-trend-up.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/components/ProductSalesAmount/Design1/index.js b/src/components/ProductSalesAmount/Design1/index.js new file mode 100644 index 0000000..35e13e0 --- /dev/null +++ b/src/components/ProductSalesAmount/Design1/index.js @@ -0,0 +1,64 @@ +import React from 'react'; + +import arrowDown from './home-trend-down.svg'; +import arrowUp from './home-trend-up.svg'; + +const Design1 = ({title,price,incomes}) => { + return
+
+ {/* title */} +
+
+

{title}

+
+ {/* price */} +

{price}تومان

+ {/* card */} +
+ {incomes.map((income,index) => ( +
+

{income.name}

+

{income.income}

+
+ {income.percent} + +
+

{income.excerpt}

+
+ ))} +
+
+
; +}; + +export default Design1; + +Design1.defaultProps = { + title: 'میزان فروش محصولات', + price: '196.209.810', + + incomes: [ + { + name: 'درآمد امروز', + income:'138.916.431', + percent: '+12', + logo: arrowUp, + excerpt: 'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است.', + }, + { + name: 'درآمد روز گذشته', + income:'651.098.311', + percent: '-0.5', + logo: arrowUp, + excerpt: 'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است.', + }, + { + name: 'درآمد این هفته', + income:'890.325.308', + percent: '+12', + logo: arrowUp, + excerpt: 'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است.', + }, + + ] +} \ No newline at end of file