Files
mr_decor/components/sections/hero/hero-49.tsx
T

74 lines
2.5 KiB
TypeScript

import { cn } from "@/lib/utils";
import { Button } from "@/components/ui/button";
interface Hero49Props {
className?: string;
title?: string;
description?: string;
showButton?: boolean;
/** تصویر داخل فریم موبایل (مثلاً اسکرین‌شات اپ) */
phoneImage?: string;
}
const Hero49 = ({
className,
title = "Master your monetary matters",
description = "Minimize financial stress and build wealth with our intuitive, AI-enhanced budgeting tool. Our platform analyzes your spending and offers insights for smarter financial decisions.",
showButton = true,
phoneImage,
}: Hero49Props) => {
const phoneImageSrc =
phoneImage ?? "https://deifkwefumgah.cloudfront.net/shadcnblocks/block/placeholder-dark-7-tall.svg";
return (
<section className={cn("bg-background py-32", className)}>
<div className="container mx-auto flex flex-col items-center px-4 pt-24 md:pt-32 lg:pt-40">
<div className="flex max-w-3xl flex-col items-center gap-8 text-center">
<h1 className="text-heading-1 font-bold text-foreground">
{title}
</h1>
<p className="text-body max-w-xl leading-relaxed tracking-tight text-muted-foreground">
{description}
</p>
{showButton && (
<Button variant="primary" size="lg" className="gap-2">
<img
alt="google play and app store download icons"
loading="lazy"
width="44"
height="18"
decoding="async"
data-nimg="1"
src="https://deifkwefumgah.cloudfront.net/shadcnblocks/block/hero49/download.svg"
/>
<p>Get started now</p>
</Button>
)}
</div>
<div className="relative translate-x-[14.7%]">
{/* Image inside Iphone */}
<div className="absolute top-[12%] left-[36.5%]! h-[67%]! w-[31%]! -translate-x-[52%] overflow-hidden rounded-[10px] bg-muted">
<img
className="min-h-full min-w-full object-cover"
src={phoneImageSrc}
alt=""
/>
</div>
{/* Iphone Image */}
<img
alt=""
src="https://deifkwefumgah.cloudfront.net/shadcnblocks/block/hero49/iphone.png"
className="relative z-10"
loading="lazy"
width="1008.71"
height="857"
/>
</div>
</div>
</section>
);
};
export { Hero49 };