31 lines
965 B
TypeScript
31 lines
965 B
TypeScript
import picOne from "../assets/hero-picture-1.png";
|
|
|
|
|
|
interface PicWithTextProps {
|
|
src?: string
|
|
title?: string
|
|
text?: string
|
|
reverse: boolean
|
|
}
|
|
|
|
|
|
export default function PicWithText(content: PicWithTextProps){
|
|
let flex_state = content.reverse ? "md:flex-row flex-col" : "md:flex-row-reverse flex-col-reverse";
|
|
return (
|
|
<div className={`flex ${flex_state} items-center md:items-start gap-8 w-full mt-10 pb-30`}>
|
|
<div className="w-full md:w-1/2 shrink-0">
|
|
<img
|
|
className="w-full h-auto rounded-2xl object-cover"
|
|
src={content.src}
|
|
alt=""
|
|
/>
|
|
</div>
|
|
<div className="w-full md:w-1/2">
|
|
<h1 className="mb-4 text-5xl font-bold">{content.title}</h1>
|
|
<p className="text-lg font-normal text-body lg:text-xl">{content.text}</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
)
|
|
} |