parent
4ef61c878e
commit
6b343c2c77
4 changed files with 82 additions and 2 deletions
After Width: | Height: | Size: 617 B |
After Width: | Height: | Size: 525 B |
@ -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 <section className="my-20"> |
||||||
|
<div className="bg-white w-5/12 rounded shadow mx-auto py-7 px-4"> |
||||||
|
{/* title */} |
||||||
|
<div className="flex flex-row items-center"> |
||||||
|
<div className="w-1 h-5 bg-blue-600 rounded ml-1"></div> |
||||||
|
<h2 className="text-lg">{title}</h2> |
||||||
|
</div> |
||||||
|
{/* price */} |
||||||
|
<p className="text-base mt-4 mr-3" style={{color:"#65A9FF"}}>{price}<span className="mr-1">تومان</span></p> |
||||||
|
{/* card */} |
||||||
|
<div className="flex flex-row items-center mt-4"> |
||||||
|
{incomes.map((income,index) => ( |
||||||
|
<div className="flex flex-col p-4 border-l border-gray-200"> |
||||||
|
<p className="text-base">{income.name}</p> |
||||||
|
<p className="text-lg font-bold text-center my-2">{income.income}</p> |
||||||
|
<div className="bg-green-100 my-2 p-1 flex flex-row items-center justify-around self-end rounded w-16"> |
||||||
|
<span className="font-bold text-sm text-green-500">{income.percent}</span> |
||||||
|
<img src={income.logo} alt="" /> |
||||||
|
</div> |
||||||
|
<p className="text-xs leading-6 text-justify mt-2">{income.excerpt}</p> |
||||||
|
</div> |
||||||
|
))} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</section>; |
||||||
|
}; |
||||||
|
|
||||||
|
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: 'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است.', |
||||||
|
}, |
||||||
|
|
||||||
|
] |
||||||
|
} |
Loading…
Reference in new issue