"use client"; import * as React from "react"; import { STATEMENT_TOUR_ANCHORS } from "../tour"; import { useBottomReserve } from "../ui/use-bottom-reserve"; import { cn } from "../lib/cn"; import { STATEMENT_PAGE_BLEED } from "./layout"; /** * The Statement page's actions on a phone (ACC-540, board M6): a bar at the * bottom of the window with the preview and the save, so neither is a whole * form away. From 640px up it is not there: the save sits beside the title * and the preview beside the form. * * It is the last thing in the page, as it is the last thing on screen, so the * keyboard reaches it after the form. */ export function StatementPhoneBar({ children, }: { children?: React.ReactNode; }) { const barRef = React.useRef(null); // Stuck to the bottom of the window, the bar covers what scrolls under it: // its height is kept clear of the focus (WCAG 2.4.11). Hidden from 640px // up, it reserves nothing. useBottomReserve(barRef); return (
*]:h-auto [&>*]:min-h-12 [&>*]:min-w-0 [&>*]:flex-1 [&>*]:px-3 [&>*]:leading-tight [&>*]:whitespace-normal", )} > {children}
); }