/* Copyright 2026 Marimo. All rights reserved. */ import { AlertTriangleIcon } from "lucide-react"; import { KeyboardHotkeys } from "@/components/shortcuts/renderShortcut"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import type { DuplicateGroup } from "@/hooks/useDuplicateShortcuts"; interface DuplicateShortcutBannerProps { duplicates: DuplicateGroup[]; } /** * Banner component that warns about duplicate keyboard shortcuts. * Displays a warning when multiple actions share the same key binding. */ export const DuplicateShortcutBanner: React.FC< DuplicateShortcutBannerProps > = ({ duplicates }) => { // Don't render if no duplicates if (duplicates.length === 0) { return null; } return ( Duplicate shortcuts

Multiple actions are assigned to the same keyboard shortcut:

    {duplicates.map(({ key, actions }) => (
  • is used by:
      {actions.map(({ action, name }) => (
    • {name}
    • ))}
  • ))}
); };