8ee9bc0bca
Build & Deploy / Build & Push Docker Image (push) Failing after 43s
Build & Deploy / Deploy to VPS (push) Has been skipped
Test / API Unit Tests (push) Failing after 4m59s
Test / Marketplace Unit Tests (push) Has been cancelled
Test / Admin Unit Tests (push) Has been cancelled
Test / Dashboard Unit Tests (push) Has been cancelled
Test / API Integration Tests (push) Has been cancelled
64 lines
2.1 KiB
TypeScript
64 lines
2.1 KiB
TypeScript
'use client'
|
|
|
|
import { LucideIcon } from 'lucide-react'
|
|
|
|
interface Feature {
|
|
title: string
|
|
body: string
|
|
icon?: LucideIcon
|
|
}
|
|
|
|
interface FeatureAlternatingProps {
|
|
features: Feature[]
|
|
}
|
|
|
|
export function FeatureAlternating({ features }: FeatureAlternatingProps) {
|
|
return (
|
|
<div className="space-y-16 lg:space-y-20">
|
|
{features.map((feature, index) => {
|
|
const Icon = feature.icon
|
|
const isEven = index % 2 === 0
|
|
|
|
return (
|
|
<div
|
|
key={feature.title}
|
|
className={`grid gap-12 items-center ${isEven ? 'lg:grid-cols-[1.1fr_0.9fr]' : 'lg:grid-cols-[0.9fr_1.1fr]'}`}
|
|
>
|
|
<div className={isEven ? 'order-1 lg:order-none' : 'order-2 lg:order-none'}>
|
|
<div className="site-panel">
|
|
<div className="flex items-start gap-3">
|
|
{Icon && <Icon className="mt-1 h-6 w-6 shrink-0 text-orange-600 dark:text-orange-500" />}
|
|
<div>
|
|
<h2 className="text-2xl font-black text-blue-950 dark:text-white sm:text-3xl">
|
|
{feature.title}
|
|
</h2>
|
|
<p className="mt-4 text-base leading-8 text-stone-600 dark:text-stone-300 sm:text-lg">
|
|
{feature.body}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div
|
|
className={`order-2 lg:order-none ${isEven ? 'order-2 lg:order-none' : 'order-1 lg:order-none'}`}
|
|
>
|
|
<div className="site-panel-muted flex h-48 items-center justify-center sm:h-56 lg:h-80">
|
|
{Icon ? (
|
|
<Icon className="h-24 w-24 text-orange-600/20 dark:text-orange-500/20" />
|
|
) : (
|
|
<div className="text-center">
|
|
<p className="text-sm font-semibold text-stone-400 dark:text-stone-600">
|
|
{feature.title}
|
|
</p>
|
|
</div>
|
|
)}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
)
|
|
})}
|
|
</div>
|
|
)
|
|
}
|