'use client'; import {H1, H2, P, PageDescription, SubpageHeader} from './typography'; import {Image, Skeleton, Text} from '@react-spectrum/s2'; import React from 'react'; import {style} from '@react-spectrum/s2/style' with {type: 'macro'}; import {useRouter} from './Router'; import {VersionBadge} from './VersionBadge'; function SkeletonVisualExample() { return ( Loading example ); } const skeletonArticle = style({ maxWidth: { default: 768, isWide: 'none', isLongForm: 900 }, marginX: 'auto', width: 'full', height: 'fit', '--text-width': { type: 'width', value: { default: 'auto', isLongForm: 600 // ~80 characters at body font size } } }); export function PageSkeleton() { let {currentPage, pages} = useRouter(); let isSubpage = currentPage.exports?.isSubpage; let section = currentPage.exports?.section || 'Components'; let isLongForm = isSubpage && section === 'Blog'; let hasToC = (!currentPage.exports?.hideNav || section === 'Blog' || section === 'Releases') && currentPage.tableOfContents?.[0]?.children && currentPage.tableOfContents?.[0]?.children?.length > 0; let isWide = !hasToC && !isLongForm && section !== 'Blog' && section !== 'Releases'; let parentUrl = new URL('./', currentPage.url); let parentIndex = parentUrl.href; let parentPageUrl = parentUrl.href.slice(0, -1); let parentPage = pages.find(p => p.url === parentIndex || p.url === parentPageUrl); let isComponents = section === 'Components'; return (
{currentPage.exports?.version && } {currentPage.exports?.isSubpage ? ( ) : ( currentPage.tableOfContents?.[0]?.level === 1 && (

{currentPage.tableOfContents?.[0].title}

) )} This is placeholder content for the page description that approximates the typical length of component descriptions. {isComponents ? ( <> {/* VisualExample */} {/* A few sections with visual examples */} {[1, 2, 3].map(i => (

Section Heading

Placeholder content for a section that describes various aspects of the component or feature being documented.

))} ) : ( <> {/* A few sections */} {[1, 2, 3, 4].map(i => (

Section Heading

Placeholder content for a section that describes various aspects of the topic being documented.

))} )}
); }