import { useState } from 'react'; type TipItemProps = { title: string; description: string; }; export function TipItem(props: TipItemProps) { const { title, description } = props; const [isToggled, setIsToggled] = useState(false); return (
{!isToggled && (
setIsToggled(true)} className="cursor-pointer rounded-lg sm:rounded-xl bg-black px-3 py-2 text-sm sm:text-base text-white" > {title}
)} {isToggled && (

{description}

)}
); }