mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 18:05:11 +03:00
* Create initial draft * Update application url * Copy changes * Update quote samples * Fix typo * Fix prop value * Fix hydration errors * Fix hydration errors, 2 * Fix hydration errors, 3 * Solve icons hydration issue * Remove console log * hide quotes * Nudges * Add form component and integration to notion (WIP) * Fix some fields mapping * Nudges and add form inline * Some fixes * Refactor notion lib * Integrate customerio * Remove logs * Apply some minor fixes * Add country selector and split location fields * Mark required fields * Add sentry error capturing * Add sentry dsn routing to edge config * Fix with a different sentry client * Remove custom transport on default sentry * Fix prettier issues * Use node client on sentry * Make monthly commitment text * Minor improvements * Use text monthly commitment in notion * Remove country flag on select item for typing search * Update apps/www/data/open-source/contributing/supasquad.tsx * Restore form reset * Fix missing env vars --------- Co-authored-by: Terry Sutton <saltcod@gmail.com>
79 lines
2.6 KiB
TypeScript
79 lines
2.6 KiB
TypeScript
import React, { FC } from 'react'
|
|
|
|
import { cn } from 'ui'
|
|
import SectionContainer from '~/components/Layouts/SectionContainer'
|
|
import type {
|
|
Feature,
|
|
FeaturesSection as FeaturesSectionType,
|
|
} from '~/data/solutions/solutions.utils'
|
|
|
|
const FeaturesSection: FC<FeaturesSectionType> = (props) => {
|
|
return (
|
|
<SectionContainer id={props.id} className="flex flex-col gap-4 md:gap-8">
|
|
<div className="flex flex-col gap-2 max-w-xl">
|
|
<span className="label">{props.label}</span>
|
|
<h2 className="h2 text-foreground-lighter">{props.heading}</h2>
|
|
{props.subheading && <p className="text-foreground-lighter mb-8">{props.subheading}</p>}
|
|
</div>
|
|
<ul
|
|
className={cn(
|
|
'grid grid-cols-1 gap-4 gap-y-10 md:grid-cols-3 md:gap-12 xl:gap-20',
|
|
props.features?.length === 4 && 'md:grid-cols-2 xl:grid-cols-4'
|
|
)}
|
|
>
|
|
{props.features?.map((feature: Feature, index: number) => (
|
|
<FeatureItem feature={feature} key={index} />
|
|
))}
|
|
</ul>
|
|
</SectionContainer>
|
|
)
|
|
}
|
|
|
|
interface FeatureItemProps {
|
|
feature: Feature
|
|
}
|
|
|
|
const FeatureItem: FC<FeatureItemProps> = ({ feature }) => {
|
|
const Icon = feature.icon
|
|
const iconSize = 7
|
|
const iconWidth = `w-${iconSize}`
|
|
const iconHeight = `h-${iconSize}`
|
|
|
|
return (
|
|
<li className="flex flex-col gap-2 text-sm text-foreground-lighter">
|
|
{Icon &&
|
|
(typeof Icon === 'string' ? (
|
|
<svg
|
|
width="25"
|
|
height="25"
|
|
viewBox="0 0 25 25"
|
|
fill={feature.iconNoStroke ? 'currentColor' : 'none'}
|
|
className="w-7 h-7 mb-2"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
>
|
|
<path
|
|
d={Icon}
|
|
fillRule="evenodd"
|
|
clipRule="evenodd"
|
|
stroke={feature.iconNoStroke ? 'none' : 'currentColor'}
|
|
strokeMiterlimit="10"
|
|
strokeLinejoin="round"
|
|
strokeLinecap="round"
|
|
strokeWidth="1"
|
|
/>
|
|
</svg>
|
|
) : (
|
|
<Icon className={cn('mb-2 text-current', iconWidth, iconHeight)} strokeWidth={1.5} />
|
|
))}
|
|
<div className="w-full h-px overflow-hidden flex items-start bg-border-muted">
|
|
<span className={cn('h-full bg-foreground-lighter', iconWidth)} />
|
|
</div>
|
|
<h4 className="text-foreground text-lg lg:text-xl mt-1">{feature.heading}</h4>
|
|
<p className="text-foreground-lighter text-sm">{feature.subheading}</p>
|
|
{/* <TextLink hasChevron label="Read story" url={feature.url} className="mt-4" /> */}
|
|
</li>
|
|
)
|
|
}
|
|
|
|
export default FeaturesSection
|