diff --git a/components/CardItem.js b/components/CardItem.js index 209fbd1..10b1737 100644 --- a/components/CardItem.js +++ b/components/CardItem.js @@ -1,6 +1,104 @@ import { useState } from 'react'; import { useRouter } from 'next/router'; +// Expanding Add Button Component +function ExpandingAddButton({ card, onAddToCollection, onAddToDeck, onMarkAsOwned }) { + const [isExpanded, setIsExpanded] = useState(false); + + const handleMainClick = (e) => { + e.stopPropagation(); + if (!isExpanded) { + setIsExpanded(true); + } else { + // Default action when expanded - add to collection + onAddToCollection([card]); + setIsExpanded(false); + } + }; + + const handleOptionClick = (e, action) => { + e.stopPropagation(); + action(); + setIsExpanded(false); + }; + + return ( +
+ {/* Expanded Options */} + {isExpanded && ( +
+ + + + + +
+ )} + + {/* Main Add Button */} + + + {/* Click outside to close */} + {isExpanded && ( +
{ + e.stopPropagation(); + setIsExpanded(false); + }} + /> + )} +
+ ); +} + export default function CardItem({ card, viewMode = 'grid', @@ -186,7 +284,7 @@ export default function CardItem({ // Grid view return ( -
+
{/* Main Card Container */}
{/* Hover Action Buttons */} - {/* Top Right - Checkbox and Favorite */} -
- {/* Selection Checkbox */} + {/* Top Left - Checkbox */} +
+
- {/* Favorite Button */} + {/* Top Right - Favorite */} +
- {/* Bottom Left - Ownership Status & Add Button */} -
- {/* Ownership Indicator - Always visible */} -
- {/* This would be connected to actual ownership data */} -
-
- - {/* Add/Own Button - Appears on hover */} - + {/* Bottom Left - Expanding Add Button */} +
+ alert('Mark as owned (coming soon)')} + />
); diff --git a/tailwind.config.js b/tailwind.config.js index acca36c..7913239 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -23,6 +23,9 @@ export default { mahogany: '#3d2317', } }, + scale: { + '102': '1.02', + }, }, }, plugins: [],