/**
* src/book/components/Pitfall.tsx
*
* Styled callout for recurring error drills (D1–D6).
* Appears once as a full introduction, then again as brief reminders in later chapters.
*
* Usage in MDX:
*
* `fd 10 -5` is parsed as two arguments, not subtraction.
* Use parentheses: `fd 10 (-5)`.
*
*/
import type { ReactNode } from 'react';
interface Props {
/** Drill identifier, e.g. "D1", "D4" */
drill?: string;
title: string;
children: ReactNode;
}
export default function Pitfall({ drill, title, children }: Props) {
return (
{drill && (
{drill}
)}
Pitfall: {title}
{children}
);
}