diff --git a/tutorial/ApiDoc.jsx b/tutorial/ApiDoc.jsx index c3ef7e96..fa752818 100644 --- a/tutorial/ApiDoc.jsx +++ b/tutorial/ApiDoc.jsx @@ -2,10 +2,23 @@ import React, { Fragment } from 'react'; import { docs } from '../doc.json'; import { MiniRepl } from './MiniRepl'; +const visible = window.location.href.includes('?api=true'); + function ApiDoc() { + if (!visible) { + return ( +
+ The API Docs are a work in progress, but you can preview it by clicking here +
+ ); + } // console.log('docJson', docs); return (+ The following Chapter is the technical API documentation. It is autogenerated from the jsdoc comments in the + source files. hide +
{docs .filter((item) => !item.name?.startsWith('_') && item.kind !== 'package') .map((item, i) => ( diff --git a/tutorial/tutorial.mdx b/tutorial/tutorial.mdx index fc01f03a..87ade218 100644 --- a/tutorial/tutorial.mdx +++ b/tutorial/tutorial.mdx @@ -701,6 +701,4 @@ import ApiDoc from './ApiDoc'; # API Docs -The following Chapter is the technical API documentation. It is autogenerated from the jsdoc comments in the source files. -