update src/components/ProductSalesAmount/Design1/index.js and src/components/ReligiousTimes/index.js

master
Your Name 3 years ago
parent 07b652c8ff
commit 7367a3c501
  1. 65
      src/components/ReligiousTimes/index.js

@ -1,27 +1,27 @@
import React from 'react' import React from 'react'
const time = { // const time = {
morningTime: "صبح", // morningTime: "صبح",
sunriseTime: "طلوع", // sunriseTime: "طلوع",
noonTime: "ظهر", // noonTime: "ظهر",
sunsetTime: "غروب", // sunsetTime: "غروب",
maghribTime: "مغرب", // maghribTime: "مغرب",
midnightTime: "نیمه شب", // midnightTime: "نیمه شب",
} // }
const ReligiousTimes = ({hours}) => { const ReligiousTimes = ({hours}) => {
return ( return (
<div className="flex flex-row items-center justify-center bg-white shadow-sm rounded-lg max-w-[444px] w-1/3 py-3.5 px-0.5 mr-10"> <div className="flex flex-row items-center justify-center bg-white shadow-sm rounded-lg max-w-[440px] w-1/3 py-3.5 px-0.5 mr-10">
{Object.keys(hours).map((hour, index) => ( {hours.map((hour,index) => (
<div className="flex flex-row items-center justify-around" key={index}> <div className="flex flex-row items-center" key={index}>
<span className="text-xs text-[#0F0543] font-bold"> <span className="text-xs text-[#0F0543] font-bold">
{time[hour]} {hour.partOfDay}
</span> </span>
<span className="text-xs text-[#2483E1] mr-1 font-bold"> <span className="text-xs text-[#2483E1] font-bold mr-1">
{hours[hour]} {hour.time}
</span> </span>
{Number(index) !== hours.length -1 && ( {Number(index) !== hours.length -1 && (
<div className="w-0.5 bg-[#9DACD355] mx-1" style={{height: "20px"}}></div> <div className="w-0.5 bg-[#9DACD344] mx-2" style={{height: "20px"}}></div>
)} )}
</div> </div>
))} ))}
@ -32,12 +32,31 @@ const ReligiousTimes = ({hours}) => {
export default ReligiousTimes export default ReligiousTimes
ReligiousTimes.defaultProps = { ReligiousTimes.defaultProps = {
hours: {
morningTime: "5:03", hours : [
sunriseTime: "6:27", {
noonTime: "12:15", partOfDay: "صبح",
sunsetTime: "18:05", time: "5:03",
maghribTime: "18:23", },
midnightTime: "23:34", {
}, partOfDay: "طلوع",
time: "6:27",
},
{
partOfDay: "ظهر",
time: "12:15",
},
{
partOfDay: "غروب",
time: "18:05",
},
{
partOfDay: "مغرب",
time: "18:23",
},
{
partOfDay: "نیمه شب",
time: "23:34",
},
]
} }
Loading…
Cancel
Save