"use client"; import clsx from "clsx"; import { useFocusRing } from "react-aria"; import ChevronRight from "../../icons/chevron-right"; import styles from "./details.module.css"; interface DetailsProps { animate?: boolean; heightClosed?: number; // 32 heightOpened?: number; // 400 open?: boolean; summary?: React.ReactNode | string; } const Details: React.FC> = ({ children, heightClosed = 32, heightOpened = 400, summary, open, }) => { const { isFocusVisible, focusProps } = useFocusRing(); return (
{ if (typeof open !== "undefined") { e.preventDefault(); } }} >
{children && ( )} {summary}
{children}
); }; export default Details;