18 lines
783 B
JavaScript
18 lines
783 B
JavaScript
// Rôle : affiche la bande déroulante partagée pour les mémos et alertes de tâches.
|
|
import { Icon } from "../../../components/Icon.jsx";
|
|
|
|
export function MemosTicker({ items, label = "Mémos", className = "" }) {
|
|
if (!items?.length) return null;
|
|
return (
|
|
<div className={["memos-ticker", className].filter(Boolean).join(" ")} aria-label={label}>
|
|
<div className="memos-ticker-track">
|
|
{[...items, ...items].map((memo, index) => (
|
|
<span className={`memos-ticker-item ${memo.kind === "task-warning" ? "is-task-warning" : ""}`} key={`${memo.id}-${index}`} style={{ "--memo-color": memo.color }}>
|
|
{memo.kind === "task-warning" && <Icon name="warning" />}
|
|
{memo.text}
|
|
</span>
|
|
))}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|