Add an independent scroll for each column
This commit is contained in:
parent
537c285bd4
commit
54da3212cb
@ -25,48 +25,48 @@ export default function InvitationsBoard({ guests, invitations }: {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex h-full">
|
||||
<div className="flex h-screen">
|
||||
{/* Left Column: Guests */}
|
||||
<div className="w-1/4 h-full overflow-y-auto border-r border-gray-300 p-4">
|
||||
<h2 className="text-lg font-semibold mb-4">Guests</h2>
|
||||
<ul>
|
||||
{availableGuests.map((guest, index) => (
|
||||
<li
|
||||
key={index}
|
||||
className="mb-4 p-4 border border-gray-300 rounded-lg shadow-sm bg-white cursor-move"
|
||||
draggable="true"
|
||||
>
|
||||
<h3 className="text-md font-medium">{guest.name}</h3>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<div className="w-1/4 h-full overflow-auto border-r border-gray-300 p-4">
|
||||
<h2 className="text-lg font-semibold mb-4">Guests</h2>
|
||||
<ul>
|
||||
{availableGuests.map((guest, index) => (
|
||||
<li
|
||||
key={index}
|
||||
className="mb-4 p-4 border border-gray-300 rounded-lg shadow-sm bg-white cursor-move"
|
||||
draggable="true"
|
||||
>
|
||||
<h3 className="text-md font-medium">{guest.name}</h3>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{/* Right Column: Invitations */}
|
||||
<div className="w-3/4 h-full overflow-y-auto p-4">
|
||||
<h2 className="text-lg font-semibold mb-4">Invitations</h2>
|
||||
<div className="w-3/4 h-full overflow-auto p-4">
|
||||
<h2 className="text-lg font-semibold mb-4">Invitations</h2>
|
||||
|
||||
<button
|
||||
onClick={handleCreateInvitation}
|
||||
className="mb-4 px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600"
|
||||
<button
|
||||
onClick={handleCreateInvitation}
|
||||
className="mb-4 px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600"
|
||||
>
|
||||
Create New Invitation
|
||||
</button>
|
||||
|
||||
<div className="grid grid-cols-3 gap-4">
|
||||
{invitations.map((invitation, index) => (
|
||||
<div
|
||||
key={invitation.id}
|
||||
className="flex items-center justify-center h-32 w-full bg-green-600 border border-green-700"
|
||||
>
|
||||
Create New Invitation
|
||||
</button>
|
||||
|
||||
<div className="grid grid-cols-3 gap-4">
|
||||
{invitations.map((invitation, index) => (
|
||||
<div
|
||||
key={invitation.id}
|
||||
className="flex items-center justify-center h-32 w-full bg-green-600 border border-green-700"
|
||||
>
|
||||
<ul className="text-center text-yellow-500 font-cursive text-lg">
|
||||
{invitation.guests.map((guest) => (
|
||||
<li key={guest.id}>{guest.name}</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
<ul className="text-center text-yellow-500 font-cursive text-lg">
|
||||
{invitation.guests.map((guest) => (
|
||||
<li key={guest.id}>{guest.name}</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user