import "./components/ui/tidal.css"; import { useState, type MouseEvent } from "react"; import { TidalFooterResources, type TidalFooterResource, type TidalFooterResourcesNavGroup } from "./components/ui/footer-resources"; import "./components/ui/footer-resources.css"; const resources: readonly TidalFooterResource[] = [ { id: "accessibility", category: "Guide", title: "Accessibility fundamentals", description: "Keyboard navigation, focus and accessible labels.", href: "#preview-accessibility", }, { id: "react", category: "Article", title: "React state and UI updates", description: "Keep state changes clear and predictable.", href: "#preview-react", }, { id: "typescript", category: "Reference", title: "Everyday TypeScript types", description: "Practical types for component APIs.", href: "#preview-typescript", }, ]; const navigationGroups: readonly TidalFooterResourcesNavGroup[] = [ { id: "library", title: "Library", links: [ { id: "components", href: "#preview-components", label: "Components" }, { id: "templates", href: "#preview-templates", label: "Templates" }, ], }, { id: "company", title: "Company", links: [ { id: "about", href: "#preview-about", label: "About" }, { id: "contact", href: "#preview-contact", label: "Contact" }, ], }, ]; function handlePreviewClick( label: string, setStatus: (status: string) => void, ) { return (event: MouseEvent) => { if ( event.defaultPrevented || event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey ) { return; } event.preventDefault(); setStatus(`${label} selected in this local preview.`); }; } export function FooterResourcesDemo() { const [status, setStatus] = useState("No preview destination selected."); const demoResources = resources.map((resource) => ({ ...resource, linkProps: { ...resource.linkProps, onClick: handlePreviewClick(String(resource.title), setStatus), }, })); const demoNavigationGroups = navigationGroups.map((group) => ({ ...group, links: group.links.map((link) => ({ ...link, onClick: handlePreviewClick(String(link.label), setStatus), })), })); return ( TidalUI } eyebrow="Useful references" heading="Keep learning." description="Guides for your next project." resources={demoResources} navigationGroups={demoNavigationGroups} legal={© 2026 TidalUI preview} status={{status}} /> ); } export default function AgentExample() { return (
); }