46 lines
1.4 KiB
TypeScript
46 lines
1.4 KiB
TypeScript
import React from 'react';
|
|||
|
|
import { Check } from 'lucide-react';
|
||
|
|
import { resolveLocalised } from '@/types';
|
||
|
|
|
||
|
|
interface FeatureListSectionProps {
|
||
|
|
title?: any;
|
||
|
|
items?: string[];
|
||
|
|
locale?: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
export function FeatureListSection({
|
||
|
|
title,
|
||
|
|
items = [],
|
||
|
|
locale = 'en',
|
||
|
|
}: FeatureListSectionProps) {
|
||
|
|
if (!items || items.length === 0) return null;
|
||
|
|
|
||
|
|
return (
|
||
|
|
<section className="py-12 bg-white dark:bg-slate-900">
|
||
|
|
<div className="max-w-5xl mx-auto px-4 sm:px-6 lg:px-8">
|
||
|
|
{title && (
|
||
|
|
<h3 className="text-2xl font-bold text-slate-900 dark:text-white mb-8 text-center">
|
||
|
|
{resolveLocalised(title, locale)}
|
||
|
|
</h3>
|
||
|
|
)}
|
||
|
|
|
||
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||
|
|
{items.map((feature, idx) => (
|
||
|
|
<div
|
||
|
|
key={idx}
|
||
|
|
className="flex items-start space-x-3 p-4 rounded-2xl bg-slate-50 dark:bg-slate-950/50 border border-slate-200 dark:border-slate-800"
|
||
|
|
>
|
||
|
|
<div className="w-5 h-5 rounded-full bg-emerald-100 dark:bg-emerald-950/60 text-emerald-600 flex items-center justify-center shrink-0 mt-0.5">
|
||
|
|
<Check className="w-3 h-3" />
|
||
|
|
</div>
|
||
|
|
<span className="text-sm font-medium text-slate-800 dark:text-slate-200">
|
||
|
|
{feature}
|
||
|
|
</span>
|
||
|
|
</div>
|
||
|
|
))}
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</section>
|
||
|
|
);
|
||
|
|
}
|