import React from 'react'; import type { Note } from '../types'; type Props = { note: Note; isSelected: boolean; onClick: () => void; onCardClick: (e: React.MouseEvent) => void; }; export function WhiteboardNoteCard({ note, isSelected, onClick, onCardClick }: Props) { // Get preview text (first 200 characters) const previewText = note.text.substring(0, 200) + (note.text.length > 200 ? '...' : ''); return (
{ if (!isSelected) { e.currentTarget.style.borderColor = '#d4cfc7'; e.currentTarget.style.boxShadow = '0 4px 12px rgba(45, 37, 31, 0.15)'; } }} onMouseLeave={(e) => { if (!isSelected) { e.currentTarget.style.borderColor = '#e8e4df'; e.currentTarget.style.boxShadow = '0 2px 8px rgba(45, 37, 31, 0.1)'; } }} > {/* Note Icon */}
📝
{/* Note Preview */}
{previewText}
{/* Footer */} {/*
{note.text.length} characters
*/}
); }