19 lines
595 B
TypeScript
19 lines
595 B
TypeScript
'use client';
|
|
|
|
import type { ActionableNotice as Notice } from '@/lib/actionable-notices';
|
|
import { Button } from './ui/button';
|
|
|
|
/** Dismissal is local and never sends a game action. */
|
|
export function ActionableNotice({ notice, onDismiss }: {
|
|
notice: Notice | null;
|
|
onDismiss: (id: number) => void;
|
|
}) {
|
|
if (!notice) return null;
|
|
return <span className="block space-y-2" aria-live="polite">
|
|
<span className="block">{notice.text}</span>
|
|
<Button type="button" variant="outline" className="min-h-11" onClick={() => onDismiss(notice.id)}>
|
|
Continue
|
|
</Button>
|
|
</span>;
|
|
}
|