mirror of
https://github.com/bentoml/OpenLLM.git
synced 2025-12-23 23:57:46 -05:00
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com> Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com> Signed-off-by: GutZuFusss <leon.ikinger@googlemail.com> Co-authored-by: GutZuFusss <leon.ikinger@googlemail.com>
31 lines
1017 B
TypeScript
31 lines
1017 B
TypeScript
import { ArrowRightIcon } from '@components/icons'
|
|
import cn from 'clsx'
|
|
import { motion } from 'framer-motion'
|
|
import Link from 'next/link'
|
|
import type { ReactNode } from 'react'
|
|
import styles from './style.module.css'
|
|
|
|
export function Feature({ large, centered, children, lightOnly, className, href, index, ...props }) {
|
|
return (
|
|
<motion.div
|
|
initial={{ opacity: 0 }}
|
|
whileInView={{ opacity: 1 }}
|
|
viewport={{ once: true, margin: '-20px' }}
|
|
transition={{ duration: Math.min(0.25 + index * 0.2, 0.8) }}
|
|
className={cn(styles.feature, large && styles.large, centered && styles.centered, lightOnly && styles['light-only'], className)}
|
|
{...props}
|
|
>
|
|
{children}
|
|
{href ? (
|
|
<Link className={styles.link} href={href} target="_blank">
|
|
<ArrowRightIcon width="1.5em" />
|
|
</Link>
|
|
) : null}
|
|
</motion.div>
|
|
)
|
|
}
|
|
|
|
export function Features({ children }: { children: ReactNode }) {
|
|
return <div className={styles.features}>{children}</div>
|
|
}
|