generated from chiffre-io/template-library
-
-
Notifications
You must be signed in to change notification settings - Fork 161
/
Copy pathlayout.tsx
42 lines (40 loc) · 1.13 KB
/
layout.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { getSharedLayoutProps } from '@/src/components/shared-layout'
import { DocsLayout } from 'fumadocs-ui/layouts/docs'
import { DocsBody, DocsPage } from 'fumadocs-ui/page'
import React, { Suspense } from 'react'
import { ReactParis2025SideBanner } from '../banners'
import { getPlaygroundTree } from './(demos)/demos'
import { DebugControl } from './debug-control'
const DebugControlsSkeleton = () => (
<label className="pointer-events-none mr-auto space-x-2 text-zinc-500 opacity-50">
<input type="checkbox" disabled />
<span>Console debugging</span>
</label>
)
export default function PlaygroundLayout({
children
}: {
children: React.ReactNode
}) {
return (
<>
<DocsLayout
tree={getPlaygroundTree()}
{...getSharedLayoutProps()}
sidebar={{
collapsible: false,
banner: <ReactParis2025SideBanner />,
footer: (
<Suspense fallback={<DebugControlsSkeleton />}>
<DebugControl />
</Suspense>
)
}}
>
<DocsPage>
<DocsBody>{children}</DocsBody>
</DocsPage>
</DocsLayout>
</>
)
}