Skip to content

Commit

Permalink
Update Next.js TypeScript configuration and Playground layout
Browse files Browse the repository at this point in the history
  • Loading branch information
marklundin committed Jan 16, 2025
1 parent 535c795 commit d0f0d91
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/docs/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
4 changes: 4 additions & 0 deletions packages/docs/src/app/_meta.global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default {
playground: {

title: 'Playground',
theme: { footer: false },
items: {
"Basic" : {
type: 'separator',
Expand All @@ -45,6 +46,9 @@ export default {
'model-viewer' : '',
'physics' : '',
'motion' : '',
'splats': {
display: 'hidden'
}
},
},
'---': {
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default async function RootLayout({ children }: { children: React.ReactNo
<body>
<Layout
banner={<Banner storageKey="0.2.1-release"><a href="https://github.com/playcanvas/react/releases/tag/v0.2.1" target="_blank" rel="noreferrer">
🎉 <b>@playcanvas/react 0.2.0</b> is released. Read more →
🎉 <b>@playcanvas/react 0.2.1</b> is released. Read more →
</a></Banner>}
navbar={navbar}
footer={<Footer>
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/content/primitives.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const Primitives = () => {
<ShadowCatcher width={5} depth={5} />
</Entity>

<div className='absolute bottom-0 top-10 p-12'>
<div className='absolute bottom-0 top-22 p-18'>
{buttons}
</div>

Expand Down
6 changes: 3 additions & 3 deletions packages/docs/src/docs-components/Playground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const PlayGround: FC<PlaygroundProps> = ({
<div id='leva-portal' className='h-0' onMouseMove={e => e.stopPropagation() } >
<Leva collapsed hidden/>
</div>
<div className="w-screen h-screen" ref={resizeRef} >
<div className="absolute w-screen h-screen top-0 -z-10" ref={resizeRef} >
<Application usePhysics fillMode={FILLMODE_NONE} resolutionMode={RESOLUTION_AUTO} >
<ResizeHandler resizeRef={resizeRef}/>
<Suspense >
Expand All @@ -74,10 +74,10 @@ const PlayGround: FC<PlaygroundProps> = ({
</div>
{ showCodeEditor && <Suspense>
<div
className='absolute top-[var(--nextra-navbar-height)] h-[calc(100vh-var(--nextra-navbar-height))] flex mx-auto max-w-[90rem] xl:p-8'
className='absolute p-0 lg:p-12 top-[calc(var(--nextra-navbar-height)+var(--nextra-banner-height))] h-[calc(100vh-var(--nextra-navbar-height)-var(--nextra-banner-height))] flex mx-auto max-w-[90rem] xl:p-8'
onMouseMove={e => e.stopPropagation() }
>
<div className='w-screen xl:w-xl overflow-hidden rounded-xl shadow-lg opacity-100 hover:opacity-90 focused:opacity-90 transition-opacity duration-300'>
<div className='w-screen lg:w-lg overflow-hidden rounded-xl shadow-lg opacity-100 hover:opacity-90 focused:opacity-90 transition-opacity duration-300'>
<div id='code-editor-header' className='flex justify-between items-center p-2 bg-zinc-800 px-4'>
<div id='code-editor-title' className='flex text-xs items-center justify-between font-mono opacity-80 w-full'>
<TerminalIcon className='w-4 h-4' />
Expand Down

0 comments on commit d0f0d91

Please sign in to comment.