diff --git a/public/images/tabs/tab-1.png b/public/images/tabs/tab-1.png new file mode 100644 index 00000000..eadb0fe2 Binary files /dev/null and b/public/images/tabs/tab-1.png differ diff --git a/public/images/tabs/tab-2.png b/public/images/tabs/tab-2.png new file mode 100644 index 00000000..1dba6372 Binary files /dev/null and b/public/images/tabs/tab-2.png differ diff --git a/public/images/tabs/tab-3.png b/public/images/tabs/tab-3.png new file mode 100644 index 00000000..f450048c Binary files /dev/null and b/public/images/tabs/tab-3.png differ diff --git a/public/images/tabs/tab-4.png b/public/images/tabs/tab-4.png new file mode 100644 index 00000000..d3ad1bdf Binary files /dev/null and b/public/images/tabs/tab-4.png differ diff --git a/src/components/sections/TestSuites.tsx b/src/components/sections/TestSuites.tsx index 59e2b8b4..c34cb94b 100644 --- a/src/components/sections/TestSuites.tsx +++ b/src/components/sections/TestSuites.tsx @@ -1,11 +1,9 @@ 'use client' -import { useId } from 'react' -import Image, { type ImageProps } from 'next/image' -import { Tab } from '@headlessui/react' +import Image from 'next/image' +import { Tab, Transition } from '@headlessui/react' import clsx from 'clsx' import { LandingPageFragment } from '~/lib/basehub-queries' -import styles from '../../styles/Landingpage.module.css' import { Container } from '~/components/Container' import screenshotDashboard from '~/images/screenshots/dashboard-view.png' @@ -14,14 +12,8 @@ import screenshotRuns from '~/images/screenshots/runs-view.png' import screenshotPRComments from '~/images/screenshots/pr-comments.png' import { getImageSizes } from '~/lib/utils/image' import { Eyebrow, Title } from '../primitives/texts' - -interface Feature { - title: React.ReactNode - subTitle: string | null - description: string | null - image: ImageProps['src'] - icon: React.ComponentType -} +import { Button } from '../Button' +import { useState } from 'react' const images = { dashboard: screenshotDashboard, @@ -29,120 +21,30 @@ const images = { runs: screenshotRuns, pr: screenshotPRComments } -const icons = { - tests: function TestsIcon() { - let id = useId() - return ( - <> - - > - ) - }, - dashboard: function DashboardIcon() { - let id = useId() - return ( - <> - - > - ) - }, - runs: function RunsIcon() { - return ( - <> - - > - ) - }, - pr: function PRIcon() { - return ( - <> - - > - ) - } -} -function Feature({ - feature, +function TabHeading({ + children, isActive, className, - ...props -}: React.ComponentPropsWithoutRef<'div'> & { - feature: Feature - isActive: boolean -}) { + ...rest +}: React.ComponentPropsWithoutRef<'div'> & { isActive: boolean }) { return ( -
-
{feature.subTitle}
-{feature.description}
+ {children} ++ {feature.description} +
++ {feature.description} +
+