Files
supabase/apps/ui-library/app/example/social-auth/layout.tsx
Ivan Vasilov 97a8df0a23 feat: Handle the classic-dark theme in www and docs apps (#45214)
This PR fixes a bug where a user might choose `classic-dark` as a theme
in `studio` but then `docs` and `marketing` apps will look weird.

To test:
- Change the localStorage value of `theme` to `classic-dark`
- Open `www` and `docs` apps, they should look ok

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added a new "classic-dark" theme option for enhanced visual
customization.

* **Improvements**
* Unified and simplified theme handling across apps for more consistent
behavior.
* Improved system-theme detection and smoother transitions when
switching themes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-05 16:18:46 +02:00

43 lines
1.4 KiB
TypeScript

import { Metadata } from 'next'
import { BaseInjector } from './../base-injector'
import { Providers } from '@/app/Providers'
export const metadata: Metadata = {
title: 'Social Auth Example',
}
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html style={{ height: '100%', overflow: 'hidden' }}>
<head>
<style
dangerouslySetInnerHTML={{
__html: `
html, body, #root, main {
height: 100% !important;
min-height: 100% !important;
margin: 0 !important;
padding: 0 !important;
overflow: hidden !important;
}
`,
}}
/>
</head>
<body style={{ height: '100%', margin: 0, padding: 0, overflow: 'hidden' }}>
<BaseInjector />
<Providers>
<div
className="flex w-full h-full items-center justify-center p-6 md:p-10 preview bg-surface-100"
style={{ minHeight: '100%' }}
>
<div className="z-0 pointer-events-none absolute h-full w-full bg-[radial-gradient(hsla(var(--foreground-default)/0.05)_1px,transparent_1px)] bg-size-[16px_16px] mask-[radial-gradient(ellipse_50%_50%_at_50%_50%,#000_70%,transparent_100%)]"></div>
<div className="w-full max-w-sm">{children}</div>
</div>
</Providers>
</body>
</html>
)
}