/* Copyright 2026 Marimo. All rights reserved. */ import { AlertCircleIcon, RotateCcwIcon, XIcon } from "lucide-react"; import type React from "react"; import type { AppConfig } from "@/core/config/config-schema"; import { useBanners, useBannersActions } from "@/core/errors/state"; import { renderHTML } from "@/plugins/core/RenderHTML"; import { Banner } from "@/plugins/impl/common/error-banner"; import { cn } from "@/utils/cn"; import { Button } from "../ui/button"; import { useRestartKernel } from "./actions/useRestartKernel"; interface Props { width: AppConfig["width"]; } export const NotebookBanner: React.FC = ({ width }) => { const { banners } = useBanners(); const { removeBanner } = useBannersActions(); if (banners.length === 0) { return null; } return (
{banners.map((banner) => (
{banner.title}
{renderHTML({ html: banner.description })} {banner.action === "restart" && }
))}
); }; const RestartSessionButton = () => { const restartKernel = useRestartKernel(); return ( ); };