diff --git a/src/components/common/MarketplaceSection.tsx b/src/components/common/MarketplaceSection.tsx new file mode 100644 index 0000000..90ea8be --- /dev/null +++ b/src/components/common/MarketplaceSection.tsx @@ -0,0 +1,53 @@ +import React from 'react'; +import { cva, type VariantProps } from 'class-variance-authority'; +import { cn } from '@/lib/utils'; + +const marketplaceSectionVariants = cva('w-full', { + variants: { + spacing: { + compact: 'marketplace-section-compact', + default: 'marketplace-section', + relaxed: 'marketplace-section-relaxed', + major: 'marketplace-section-major', + none: 'my-0', + }, + container: { + default: 'mx-auto max-w-7xl', + full: 'w-full', + none: '', + }, + }, + defaultVariants: { + spacing: 'default', + container: 'none', + }, +}); + +interface MarketplaceSectionProps + extends React.HTMLAttributes, + VariantProps { + as?: 'section' | 'div' | 'header' | 'footer'; +} + +const MarketplaceSection: React.FC = ({ + children, + spacing, + container, + className, + as: Tag = 'section', + ...props +}) => { + return ( + + {children} + + ); +}; + +export default MarketplaceSection; diff --git a/src/components/common/SectionDivider.tsx b/src/components/common/SectionDivider.tsx index 04a96f7..b7c27e0 100644 --- a/src/components/common/SectionDivider.tsx +++ b/src/components/common/SectionDivider.tsx @@ -9,9 +9,9 @@ interface SectionDividerProps { } const spacingClasses: Record = { - compact: 'my-4 md:my-5', - default: 'my-6 md:my-8', - relaxed: 'my-8 md:my-12', + compact: 'marketplace-section-compact', + default: 'marketplace-section', + relaxed: 'marketplace-section-relaxed', }; function SectionDivider({ title, spacing = 'default', className }: SectionDividerProps) { diff --git a/src/index.css b/src/index.css index 1f3f8e5..2fb69cf 100644 --- a/src/index.css +++ b/src/index.css @@ -49,6 +49,10 @@ --font-manrope: 'Manrope', sans-serif; --font-inter: 'Inter', sans-serif; --font-jakarta: 'Plus Jakarta Sans', sans-serif; + --spacing-section-compact: clamp(1rem, 4vh, 1.25rem); + --spacing-section-default: clamp(1.5rem, 6vh, 2rem); + --spacing-section-relaxed: clamp(2rem, 8vh, 3rem); + --spacing-section-major: clamp(3rem, 12vh, 4rem); } :root { @@ -128,3 +132,25 @@ @apply bg-background text-foreground; } } + +@layer components { + .marketplace-section { + margin-top: var(--spacing-section-default); + margin-bottom: var(--spacing-section-default); + } + + .marketplace-section-compact { + margin-top: var(--spacing-section-compact); + margin-bottom: var(--spacing-section-compact); + } + + .marketplace-section-relaxed { + margin-top: var(--spacing-section-relaxed); + margin-bottom: var(--spacing-section-relaxed); + } + + .marketplace-section-major { + margin-top: var(--spacing-section-major); + margin-bottom: var(--spacing-section-major); + } +} diff --git a/src/pages/LandingPage.tsx b/src/pages/LandingPage.tsx index 6ba8f4f..2e4439e 100644 --- a/src/pages/LandingPage.tsx +++ b/src/pages/LandingPage.tsx @@ -12,6 +12,7 @@ import SectionHeading from '@/components/common/SectionHeading'; import CompactSectionSubtitle from '@/components/common/CompactSectionSubtitle'; import CreatorProfileInfoGrid from '@/components/common/CreatorProfileInfoGrid'; import MiniStatChip from '@/components/common/MiniStatChip'; +import MarketplaceSection from '@/components/common/MarketplaceSection'; const FEATURED_CREATOR_FACTS = [ { label: 'Membership', value: 'Collectors Circle' }, @@ -152,7 +153,7 @@ function LandingPage() {
-
+ Access Layer -
+
Buy Access
-
+ @@ -192,7 +193,7 @@ function LandingPage() { -
+
)} - + -
+
-
+
);