feat: add gain responsive

This commit is contained in:
2026-07-22 22:33:14 +02:00
parent 5cee5a2047
commit 4dc557a255
29 changed files with 1128 additions and 908 deletions

View File

@ -0,0 +1,35 @@
import type { Notification } from '../../types/types';
import './Notifications.css';
type Props = {
notifications: Notification[];
onRemove: (id: number) => void;
onHover: (id: number, hovering: boolean) => void;
};
export default function Notifications({ notifications, onRemove, onHover }: Props) {
return (
<div className="notifications">
{notifications.map((n) => (
<div
key={n.id}
className={`notification ${n.type} ${n.removing ? 'notification-out' : ''}`}
onMouseEnter={() => onHover(n.id, true)}
onMouseLeave={() => onHover(n.id, false)}
>
<span className="notification-message" title={n.message}>
{n.message}
</span>
<button
className="tab-close notification-close"
onClick={() => onRemove(n.id)}
aria-label="Dismiss notification"
>
×
</button>
</div>
))}
</div>
);
}