Files
asan-installer-front/src/components/home/status-box-items.tsx
T
Alihaghighattalab 02bd8ba075 complete home page
2024-08-06 16:24:04 +03:30

30 lines
1.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { FC } from "react"
import { StatusBoxItemInterface } from "../../types"
import { filterNumber } from "../../utility/status"
type Props = {
item: StatusBoxItemInterface
}
export const StatusBoxItem: FC<Props> = ({ item }) => {
return (
<div className="w-full bg-auth-form p-[18px] h-full rounded-[40px] flex flex-col gap-[42px]">
<div className="size-16 bg-secondary-color flex justify-center rounded-full items-center">
{item?.icon}
</div>
<div className="flex flex-col gap-3">
<p className="font-normal text-base text-secondary-text-color">{item?.title}</p>
<p className="font-medium text-[28px] text-primary-text-color">
{item?.name === "coin" && <p className="flex items-end gap-x-1">
{filterNumber(item?.value)} <p className="text-lg font-normal">تومان</p>
</p>}
{item?.name === "dollar" && <p className="text-lg font-normal flex items-center gap-x-1">$
<p className="font-medium text-[28px] text-primary-text-color">
{filterNumber(item?.value)}
</p>
</p>}
{item?.name !== "coin" && item?.name !== "dollar" && item?.value}
</p>
</div>
</div>
)
}