mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 18:05:11 +03:00
* add products pag subnav * functions page first sections * new functions page sections * functions dx section images * functions hero layout setup * functions page hero animation * final cta * revisit functions page structure * functions realtime logs animation * functions query logs animation * function metrics chart * finish edge functions hero animation * finish edge functions metrics graph * update products cta section * edge functions page code cleanup * restore Panel * restore code block bg * pause timed sections when not in view to optimize perf * create new code window component and add functions code snippets * finish edge functions * update functions page * improve animation timing in functions page * fix type error * clean up functions page code * update swiper and fix hydration errors * fix swiper module import * fix swiper css import * image bg * edge functions page details fix * fix scroll bug * edge functions page * finalize edge functions page * add anchors and improve semantics * remove double prop * add links to docs * add link to edge runtime * fix timed panel progress bar retrigger * fix timed accordion progress bar retrigger
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import React, { useRef, useState } from 'react'
|
|
import { INITIAL_BOTTOM, getAnimation } from '~/lib/animations'
|
|
|
|
interface Highlight {
|
|
image?: React.ReactNode
|
|
svg?: React.ReactNode
|
|
title: string
|
|
paragraph: string | React.ReactNode
|
|
}
|
|
|
|
const HighlightColumns = ({ highlights }: { highlights: Highlight[] }) => {
|
|
return (
|
|
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 md:gap-8 xl:gap-32">
|
|
{highlights.map((highlight, i) => (
|
|
<Highlight highlight={highlight} key={highlight.title} />
|
|
))}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
const Highlight = ({ highlight }: { highlight: Highlight }) => {
|
|
const Img: any = highlight.image
|
|
|
|
return (
|
|
<div className="flex flex-col">
|
|
<div className="relative w-full mb-4">
|
|
{highlight.image && <Img />}
|
|
{highlight.svg && highlight.svg}
|
|
</div>
|
|
<div className="flex flex-col gap-2">
|
|
<h3 className="text-lg text-foreground">{highlight.title}</h3>
|
|
<p className="text-foreground-lighter">{highlight.paragraph}</p>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default HighlightColumns
|