Skip to content

Commit af02cd4

Browse files
committed
notificaciones responsive
1 parent 4e76c80 commit af02cd4

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/layout/Header.jsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,14 @@ export const Header = () => {
6363

6464
{/* Panel de notificaciones */}
6565
{profile && notificationsOpen && (
66-
<div className="absolute right-0 mt-2 w-80 max-w-xs bg-neutral-70 shadow-lg rounded-xl z-50">
66+
<div
67+
className={`
68+
absolute z-50 mt-2
69+
w-[95vw] max-w-xs left-1/2 -translate-x-1/2 right-auto
70+
sm:w-80 sm:max-w-xs sm:left-auto sm:right-0 sm:translate-x-0
71+
bg-neutral-70 shadow-lg rounded-xl
72+
`}
73+
>
6774
<div className="flex justify-between items-center px-4 py-3 border-b border-base-200">
6875
<span className="font-semibold text-base-content">Notificaciones</span>
6976
<button
@@ -82,9 +89,9 @@ export const Header = () => {
8289
.map((notif, index) => (
8390
<div
8491
key={notif._id || `${notif.senderName}-${notif.type}-${index}`}
85-
className="w-full bg-neutral-60 text-base-content shadow-md rounded-md p-3"
92+
className="w-full bg-neutral-60 text-base-content shadow-md rounded-md p-3 break-words"
8693
>
87-
<div className="text-sm font-medium">
94+
<div className="text-sm font-medium break-words">
8895
{getNotificationText(notif)}
8996
</div>
9097
<span className="text-xs opacity-60 block mt-1">

0 commit comments

Comments
 (0)