Numbered Cards large breakpoint
This commit is contained in:
@@ -4,15 +4,15 @@ import SectionNumber from "./SectionNumber";
|
||||
|
||||
const NumberedCard = ({ number, text, iconShape, iconColor }) => {
|
||||
return (
|
||||
<div className="bg-[var(--color-surface-inverse-primary)] rounded-[12px] p-5 shadow-lg flex flex-col gap-4 sm:p-8 sm:gap-8 sm:flex-row sm:items-center">
|
||||
{/* Section Number - Left part (sm breakpoint) */}
|
||||
<div className="flex justify-end sm:justify-start sm:flex-shrink-0">
|
||||
<div className="bg-[var(--color-surface-inverse-primary)] rounded-[12px] p-5 shadow-lg flex flex-col gap-4 sm:p-8 sm:gap-8 sm:flex-row sm:items-center lg:p-8 lg:gap-0 lg:flex-row lg:items-stretch lg:relative lg:h-[238px]">
|
||||
{/* Section Number - Top right (lg breakpoint) */}
|
||||
<div className="flex justify-end sm:justify-start sm:flex-shrink-0 lg:absolute lg:top-8 lg:right-8">
|
||||
<SectionNumber number={number} />
|
||||
</div>
|
||||
|
||||
{/* Card Content - Right part (sm breakpoint) */}
|
||||
<div className="sm:flex-1">
|
||||
<p className="font-bricolage-grotesque font-medium text-[24px] leading-[32px] sm:font-normal sm:leading-[24px] text-[#141414]">
|
||||
{/* Card Content - Bottom left (lg breakpoint) */}
|
||||
<div className="sm:flex-1 lg:absolute lg:bottom-8 lg:left-8 lg:right-16">
|
||||
<p className="font-bricolage-grotesque font-medium text-[24px] leading-[32px] sm:font-normal sm:leading-[24px] sm:text-[24px] text-[#141414]">
|
||||
{text}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -6,31 +6,46 @@ import Button from "./Button";
|
||||
|
||||
const NumberedCards = ({ title, subtitle, cards }) => {
|
||||
return (
|
||||
<section className="bg-transparent py-8 px-5 sm:py-12 sm:px-8">
|
||||
<section className="bg-transparent py-[var(--spacing-scale-032)] px-[var(--spacing-scale-020)] sm:py-[var(--spacing-scale-048)] sm:px-[var(--spacing-scale-032)] lg:py-[var(--spacing-scale-064)] lg:px-[var(--spacing-scale-064)]">
|
||||
<div className="max-w-[var(--spacing-measures-max-width-lg)] mx-auto">
|
||||
{/* Section Header */}
|
||||
<div className="mb-8 sm:mb-8">
|
||||
<SectionHeader title={title} subtitle={subtitle} />
|
||||
</div>
|
||||
|
||||
{/* Cards Container */}
|
||||
<div className="space-y-8 sm:space-y-8">
|
||||
{cards.map((card, index) => (
|
||||
<NumberedCard
|
||||
key={index}
|
||||
number={index + 1}
|
||||
text={card.text}
|
||||
iconShape={card.iconShape}
|
||||
iconColor={card.iconColor}
|
||||
<div className="grid grid-cols-1 gap-y-[var(--spacing-scale-032)] lg:gap-y-[var(--spacing-scale-056)]">
|
||||
{/* Section Header */}
|
||||
<div>
|
||||
<SectionHeader
|
||||
title={title}
|
||||
subtitle={subtitle}
|
||||
titleLg="How CommunityRule helps"
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Call to Action Button */}
|
||||
<div className="text-center mt-8 sm:text-left sm:mt-8">
|
||||
<Button variant="default" size="large">
|
||||
Create CommunityRule
|
||||
</Button>
|
||||
{/* Cards Container */}
|
||||
<div className="grid grid-cols-1 gap-y-[var(--spacing-scale-024)] lg:grid-cols-3 lg:gap-[var(--spacing-scale-024)]">
|
||||
{cards.map((card, index) => (
|
||||
<NumberedCard
|
||||
key={index}
|
||||
number={index + 1}
|
||||
text={card.text}
|
||||
iconShape={card.iconShape}
|
||||
iconColor={card.iconColor}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Call to Action Button */}
|
||||
<div className="text-center sm:text-left lg:text-center">
|
||||
{/* Default button for xsm and sm breakpoints */}
|
||||
<div className="block lg:hidden">
|
||||
<Button variant="default" size="large">
|
||||
Create CommunityRule
|
||||
</Button>
|
||||
</div>
|
||||
{/* Outlined button for lg and xlg breakpoints */}
|
||||
<div className="hidden lg:block">
|
||||
<Button variant="outlined" size="large">
|
||||
See how it works
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,17 +1,22 @@
|
||||
"use client";
|
||||
|
||||
const SectionHeader = ({ title, subtitle }) => {
|
||||
const SectionHeader = ({ title, subtitle, titleLg }) => {
|
||||
return (
|
||||
<div className="flex flex-col gap-1 w-full">
|
||||
{/* Title - Bricolage Grotesque */}
|
||||
<h2 className="font-bricolage-grotesque font-bold text-[28px] leading-[36px] sm:text-[32px] sm:leading-[40px] text-[var(--color-content-default-primary)]">
|
||||
{title}
|
||||
</h2>
|
||||
<div className="flex flex-col gap-1 w-full lg:flex-row lg:justify-between lg:items-start">
|
||||
{/* Title Container - Left side (lg breakpoint) */}
|
||||
<div className="lg:w-[369px] lg:h-[120px] lg:flex lg:items-center">
|
||||
<h2 className="font-bricolage-grotesque font-bold text-[28px] leading-[36px] sm:text-[32px] sm:leading-[40px] lg:text-[32px] lg:leading-[40px] lg:w-[369px] lg:pr-24 text-[var(--color-content-default-primary)]">
|
||||
<span className="block lg:hidden">{title}</span>
|
||||
<span className="hidden lg:block">{titleLg || title}</span>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
{/* Subtitle - Inter */}
|
||||
<p className="font-inter font-normal text-[18px] leading-[130%] sm:text-[18px] sm:leading-[32px] text-[#484848] sm:text-[var(--color-content-default-tertiary)] tracking-[0px]">
|
||||
{subtitle}
|
||||
</p>
|
||||
{/* Subtitle Container - Right side (lg breakpoint) */}
|
||||
<div className="lg:w-[928px] lg:h-[120px] lg:flex lg:items-center lg:justify-end">
|
||||
<p className="font-inter font-normal text-[18px] leading-[130%] sm:text-[18px] sm:leading-[32px] lg:text-[24px] lg:leading-[32px] text-[#484848] sm:text-[var(--color-content-default-tertiary)] lg:text-[var(--color-content-default-tertiary)] tracking-[0px]">
|
||||
{subtitle}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user