import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from '@/components/ui/card'; import { cn } from '@/components/ui/core/styling'; import React, { useRef, useState } from 'react'; type SettingsCardProps = { title?: string; description?: string; children: React.ReactNode; }; export function SettingsNavCard({ title, children }: SettingsCardProps) { const [position, setPosition] = useState({ x: 0, y: 0 }); const cardRef = useRef(null); const handleMouseMove = (e: React.MouseEvent) => { if (!cardRef.current) return; const rect = cardRef.current.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; setPosition({ x, y }); }; return (
{/*
*/} {children}
); } export function SettingsCard({ title, description, children, className, }: SettingsCardProps & { className?: string }) { const [position, setPosition] = useState({ x: 0, y: 0 }); const cardRef = useRef(null); const handleMouseMove = (e: React.MouseEvent) => { if (!cardRef.current) return; const rect = cardRef.current.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; setPosition({ x, y }); }; // If the card is set to h-full or flex, make CardContent stretch const stretchContent = className?.includes('h-full') || className?.includes('flex'); return ( <> {/*
*/} {title && ( {title} {description && {description}} )} {children} ); }