import shots from "./shots.json"; import { useMode } from "./theme"; const captured = new Set(shots.stories); const windows: Record = shots.windows; /** Whether the site shows this story as a native capture. */ export const isCaptured = (page: string, story: string) => captured.has(`${page}/${story}`); /** A capture at twice its pixels, in the site's mode. */ function Shot({ name, alt }: { name: string; alt: string }) { const theme = useMode(); return {alt}; } export function Capture({ page, story, title }: { page: string; story: string; title: string }) { return (
Native capture, macOS
); } /** The windows a live story opens, captured natively. */ export function Windows({ page, story, title }: { page: string; story: string; title: string }) { const names = windows[`${page}/${story}`]; if (!names) return null; return (
{names.map((name) => ( ))}
The windows it opens, natively
); }