You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
995 B

3 years ago
import React from 'react'
const time = {
3 years ago
morning: "صبح",
sunrise: "طلوع",
noon: "ظهر",
sunset: "غروب",
maghrib: "مغرب",
midnight: "نیمه شب",
}
const ReligiousTimes = ({hours}) => {
3 years ago
return (
<div className="flex flex-row items-center justify-around bg-white shadow rounded-md max-w-[420px] w-1/3">
{Object.keys(hours).map((hour,index) => (
<div className="flex flex-row items-center bg-pink-200" key={index}>
<span className="bg-red-400">
{time[hour]}
</span>
<span className="bg-blue-400">
{hours[hour]}
</span>
</div>
))}
</div>
3 years ago
)
}
export default ReligiousTimes
ReligiousTimes.defaultProps = {
hours: {
morningTime: "5:03",
sunriseTime: "6:27",
noonTime: "12:15",
sunsetTime: "18:05",
maghribTime: "18:23",
midnightTime: "23:34",
},
}