diff --git a/src/components/MobileControlsDock.tsx b/src/components/MobileControlsDock.tsx new file mode 100644 index 0000000..3ec2eee --- /dev/null +++ b/src/components/MobileControlsDock.tsx @@ -0,0 +1,40 @@ +import React from "react"; + +type MobileControlsDockProps = { + children: React.ReactNode; + /** When false, renders nothing. */ + visible?: boolean; + /** Optional override for the outer z-index. */ + zIndexClassName?: string; +}; + +/** + * Fixed bottom dock for mobile game controls. + * - Always visible on screen + * - Respects iOS safe-area + * - Keeps design tokens (no raw colors) + */ +export function MobileControlsDock({ + children, + visible = true, + zIndexClassName = "z-[70]", +}: MobileControlsDockProps) { + if (!visible) return null; + + return ( +
+
+
+ {children} +
+
+
+ ); +} + +/** Spacer to prevent fixed dock from covering page content in scroll containers. */ +export function MobileControlsSpacer({ heightClassName = "h-40" }: { heightClassName?: string }) { + return