"use client"; import React from "react"; import { DynamicTabT } from "./types"; import { AnimatePresence, motion } from "framer-motion"; import { Collapse } from "@shared/components/collapse"; import { MaterialIcon } from "@shared/components/material-icon"; import { Button } from "@shared/contentful/blocks/button"; import { cx } from "@shared/utils"; export interface TabViewProps { items: DynamicTabT[]; currentTabIndex: number; onTabClick: (index: number, anchor: string) => void; } export function TabView({ items, currentTabIndex, onTabClick }: TabViewProps) { return ( <>
{items.map((item, index) => ( ))}
{items.map((item, index) => (
{item.tabContent}
))} ); } export function AccordionView({ items, currentTabIndex, onTabClick, }: TabViewProps) { return ( <> {items.map((item, index) => (
{item.tabContent}
))} ); } export function SidebarView({ items, currentTabIndex, onTabClick, }: TabViewProps) { return (
{items.map((item, index) => ( ))}
{items.map((item, index) => (
{item.tabContent}
))}
); }