update App.js, src/components/CourseChapter/index.js, src/components/NumOfGuestsEmployees/index.js and src/components/ReligiousTimes/index.js
parent
ee043fea31
commit
9efb249520
4 changed files with 133 additions and 146 deletions
@ -1,42 +1,65 @@ |
|||||||
import React from 'react' |
import React from "react"; |
||||||
|
|
||||||
const NumOfGuestsEmployees = ({ items }) => { |
const NumOfGuestsEmployees = ({ items }) => { |
||||||
|
console.log(items); |
||||||
return ( |
return ( |
||||||
<div className="flex flex-row flex-wrap items-center justify-center bg-white shadow-sm rounded-lg max-w-[280px] w-1/3 mt-10 mr-10 py-2"> |
<div className="mt-20 flex flex-col items-center gap-y-4 max-w-[400px] mx-auto bg-white shadow-sm rounded-lg p-3"> |
||||||
{items.map((item,i) => ( |
{items.map((row, index) => ( |
||||||
<div className="flex flex-row"> |
<div |
||||||
<div className="font-bold text-xs flex flex-col items-center"> |
className={`flex flex-row items-center justify-around w-full border-gray-200 pb-3 ${ |
||||||
|
index + 1 < items.length ? "border-b" : "" |
||||||
|
}`}
|
||||||
|
key={index} |
||||||
|
> |
||||||
|
{row.map((item, index) => ( |
||||||
|
<div |
||||||
|
className={`flex flex-col items-center font-bold text-xs border-gray-200 flex-1 ${ |
||||||
|
index + 1 < row.length ? "border-l" : "" |
||||||
|
}`}
|
||||||
|
> |
||||||
<p className="text-[#0F0543]">{item.name}</p> |
<p className="text-[#0F0543]">{item.name}</p> |
||||||
<span className="text-[#2483E1] mt-2">{item.number} نفر</span> |
<span |
||||||
|
className={` mt-2 ${ |
||||||
|
item.remaining ? "text-[#E16524]" : "text-[#2483E1]" |
||||||
|
}`}
|
||||||
|
> |
||||||
|
{item.number} نفر |
||||||
|
</span> |
||||||
</div> |
</div> |
||||||
{Number(i) !== items.length -1 && ( |
))} |
||||||
<div className="w-0.5 bg-[#9DACD344] mx-3" style={{height: "44px"}}></div> |
|
||||||
)} |
|
||||||
</div> |
</div> |
||||||
))} |
))} |
||||||
</div> |
</div> |
||||||
) |
); |
||||||
} |
}; |
||||||
|
|
||||||
export default NumOfGuestsEmployees |
export default NumOfGuestsEmployees; |
||||||
|
|
||||||
NumOfGuestsEmployees.defaultProps = { |
NumOfGuestsEmployees.defaultProps = { |
||||||
items: [ |
items: [ |
||||||
|
[ |
||||||
{ |
{ |
||||||
name: "تعداد کارمندان محترم", |
name: "تعداد کارمندان محترم", |
||||||
number: "259", |
number: "259", |
||||||
|
remaining: false, |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
name: "تعداد مهمانان محترم", |
name: "تعداد مهمانان محترم", |
||||||
number: "569", |
number: "569", |
||||||
|
remaining: false, |
||||||
|
}, |
||||||
|
], |
||||||
|
[ |
||||||
|
{ |
||||||
|
name: "ظرفیت باقیمانده کارمندان محترم", |
||||||
|
number: "5", |
||||||
|
remaining: true, |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: "ظرفیت باقیمانده مهمانان محترم", |
||||||
|
number: "6", |
||||||
|
remaining: true, |
||||||
}, |
}, |
||||||
// {
|
], |
||||||
// name: "ظرفیت باقیمانده کارمندان محترم",
|
], |
||||||
// number: "5",
|
}; |
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: "ظرفیت باقیمانده مهمانان محترم",
|
|
||||||
// number: "6",
|
|
||||||
// },
|
|
||||||
] |
|
||||||
} |
|
||||||
|
Loading…
Reference in new issue