Update src/components/sections/hero/HeroBillboard.tsx
This commit is contained in:
@@ -1,93 +1,29 @@
|
|||||||
"use client";
|
import React from 'react';
|
||||||
|
|
||||||
import TextBox from "@/components/Textbox";
|
const HeroBillboard = () => {
|
||||||
import MediaContent from "@/components/shared/MediaContent";
|
|
||||||
import { cls } from "@/lib/utils";
|
|
||||||
import type { LucideIcon } from "lucide-react";
|
|
||||||
import type { ButtonConfig } from "@/types/button";
|
|
||||||
|
|
||||||
interface HeroBillboardProps {
|
|
||||||
title: string;
|
|
||||||
description: string;
|
|
||||||
tag?: string;
|
|
||||||
tagIcon?: LucideIcon;
|
|
||||||
buttons?: ButtonConfig[];
|
|
||||||
imageSrc?: string;
|
|
||||||
videoSrc?: string;
|
|
||||||
imageAlt?: string;
|
|
||||||
videoAriaLabel?: string;
|
|
||||||
ariaLabel?: string;
|
|
||||||
className?: string;
|
|
||||||
containerClassName?: string;
|
|
||||||
textBoxClassName?: string;
|
|
||||||
titleClassName?: string;
|
|
||||||
descriptionClassName?: string;
|
|
||||||
tagClassName?: string;
|
|
||||||
buttonContainerClassName?: string;
|
|
||||||
buttonClassName?: string;
|
|
||||||
buttonTextClassName?: string;
|
|
||||||
mediaWrapperClassName?: string;
|
|
||||||
imageClassName?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const HeroBillboard = ({
|
|
||||||
title,
|
|
||||||
description,
|
|
||||||
tag,
|
|
||||||
tagIcon,
|
|
||||||
buttons,
|
|
||||||
imageSrc,
|
|
||||||
videoSrc,
|
|
||||||
imageAlt = "",
|
|
||||||
videoAriaLabel = "Hero video",
|
|
||||||
ariaLabel = "Hero section",
|
|
||||||
className = "",
|
|
||||||
containerClassName = "",
|
|
||||||
textBoxClassName = "",
|
|
||||||
titleClassName = "",
|
|
||||||
descriptionClassName = "",
|
|
||||||
tagClassName = "",
|
|
||||||
buttonContainerClassName = "",
|
|
||||||
buttonClassName = "",
|
|
||||||
buttonTextClassName = "",
|
|
||||||
mediaWrapperClassName = "",
|
|
||||||
imageClassName = "",
|
|
||||||
}: HeroBillboardProps) => {
|
|
||||||
return (
|
return (
|
||||||
<section
|
<section className="bg-gradient-to-br from-blue-50 to-purple-50 dark:from-gray-900 dark:to-gray-800">
|
||||||
aria-label={ariaLabel}
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-20">
|
||||||
className={cls("w-full py-hero-page-padding", className)}
|
<div className="text-center">
|
||||||
>
|
<h1 className="text-5xl font-bold text-gray-900 dark:text-white mb-6">
|
||||||
<div className={cls("w-content-width mx-auto flex flex-col gap-14 md:gap-15", containerClassName)}>
|
Build Beautiful Components
|
||||||
<TextBox
|
</h1>
|
||||||
title={title}
|
<p className="text-xl text-gray-600 dark:text-gray-300 mb-8 max-w-3xl mx-auto">
|
||||||
description={description}
|
Create stunning web applications with our modern component library.
|
||||||
tag={tag}
|
Fast, reliable, and beautiful.
|
||||||
tagIcon={tagIcon}
|
</p>
|
||||||
buttons={buttons}
|
<div className="flex flex-col sm:flex-row gap-4 justify-center">
|
||||||
className={cls("flex flex-col gap-3 md:gap-1", textBoxClassName)}
|
<button className="bg-blue-600 text-white px-8 py-3 rounded-lg hover:bg-blue-700 transition-colors">
|
||||||
titleClassName={cls("text-6xl font-medium text-balance", titleClassName)}
|
Get Started
|
||||||
descriptionClassName={cls("text-base md:text-lg leading-[1.2]", descriptionClassName)}
|
</button>
|
||||||
tagClassName={cls("px-3 py-1 text-sm rounded-theme card text-foreground inline-flex items-center gap-2 mb-3", tagClassName)}
|
<button className="bg-white text-gray-900 px-8 py-3 rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors">
|
||||||
buttonContainerClassName={cls("flex gap-4 mt-3", buttonContainerClassName)}
|
Learn More
|
||||||
buttonClassName={buttonClassName}
|
</button>
|
||||||
buttonTextClassName={buttonTextClassName}
|
</div>
|
||||||
center={true}
|
|
||||||
/>
|
|
||||||
<div className={cls("w-full overflow-hidden rounded-theme-capped card p-4", mediaWrapperClassName)}>
|
|
||||||
<MediaContent
|
|
||||||
imageSrc={imageSrc}
|
|
||||||
videoSrc={videoSrc}
|
|
||||||
imageAlt={imageAlt}
|
|
||||||
videoAriaLabel={videoAriaLabel}
|
|
||||||
imageClassName={cls("z-1", imageClassName)}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
HeroBillboard.displayName = "HeroBillboard";
|
|
||||||
|
|
||||||
export default HeroBillboard;
|
export default HeroBillboard;
|
||||||
Reference in New Issue
Block a user