Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ const props: supportUsButtonProps = {
description: "", // ← your subheading
sponsorLabel: "", // ← optional label above org info
Image: { src: "", alt: "" }, // ← hero background image, Note: Remove the prop if you do not require a hero image.
fit: "", // ← use "cover" for full-width images, "contain" for logo-style images to avoid cropping
},

organizationInformation: {
Expand All @@ -198,7 +199,7 @@ const props: supportUsButtonProps = {
description: "", // ← why people should sponsor
sponsorLink: [
{
name: "Examplename"
name: "Examplename",
className: "sponsor-link",
url: "https://example.com/sponsor",
icon: null, // This Accepts ReactNode element(JSX)
Expand Down
6 changes: 4 additions & 2 deletions src/components/SupportUsButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,15 @@ function SupportUsButton({
className={`w-full font-sans justify-center items-center text-center ${Theme == "light" || Theme == "dark" ? classAccordingToTheme(Theme) : "bg-black text-white"} ${classNames.container}`}
>
{/* Hero section with optional background image*/}
<div className="relative w-full h-[50vh] flex justify-center">
<div className="relative w-full h-[40vh] flex justify-center">
{hero.Image && (
<img
src={hero.Image.src}
alt={hero.Image.alt}
title={hero.Image.alt}
className="w-full h-full object-cover object-center pointer-none:cursor-none select-none"
className={`w-full h-full ${
hero.fit === "contain" ? "object-contain" : "object-cover"
} object-center pointer-none:cursor-none select-none`}
/>
)}
{/* Gradient overlay */}
Expand Down
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export type Hero = {

title: string;
description: string;
fit?: "cover" | "contain";

/** Label like: YOU'RE SPONSORING */
sponsorLabel?: string;
Expand Down
Loading