feat: add TuonoLayoutProps interface (#702)

This commit is contained in:
Marco Pasqualetti
2025-04-03 08:53:20 +02:00
committed by GitHub
parent 0fa83fb1a2
commit 0335c8c1ad
6 changed files with 27 additions and 25 deletions
+5 -6
View File
@@ -1,13 +1,12 @@
import type { ReactNode, JSX } from 'react'
import type { JSX } from 'react'
import { TuonoScripts } from 'tuono'
import type { TuonoLayoutProps } from 'tuono'
import '../styles/global.css'
interface RootLayoutProps {
children: ReactNode
}
export default function RootLayout({ children }: RootLayoutProps): JSX.Element {
export default function RootLayout({
children,
}: TuonoLayoutProps): JSX.Element {
return (
<html>
<body>
@@ -1,13 +1,12 @@
import type { ReactNode, JSX } from 'react'
import type { JSX } from 'react'
import { TuonoScripts } from 'tuono'
import type { TuonoLayoutProps } from 'tuono'
import '../styles/global.css'
interface RootLayoutProps {
children: ReactNode
}
export default function RootLayout({ children }: RootLayoutProps): JSX.Element {
export default function RootLayout({
children,
}: TuonoLayoutProps): JSX.Element {
return (
<html>
<body>
+5 -6
View File
@@ -1,14 +1,13 @@
import type { ReactNode, JSX } from 'react'
import type { JSX } from 'react'
import { MDXProvider } from '@mdx-js/react'
import { TuonoScripts } from 'tuono'
import type { TuonoLayoutProps } from 'tuono'
import '../styles/global.css'
interface RootLayoutProps {
children: ReactNode
}
export default function RootLayout({ children }: RootLayoutProps): JSX.Element {
export default function RootLayout({
children,
}: TuonoLayoutProps): JSX.Element {
return (
<html>
<body>
@@ -1,13 +1,12 @@
import type { ReactNode, JSX } from 'react'
import type { JSX } from 'react'
import { TuonoScripts } from 'tuono'
import type { TuonoLayoutProps } from 'tuono'
import '../styles/global.css'
interface RootLayoutProps {
children: ReactNode
}
export default function RootLayout({ children }: RootLayoutProps): JSX.Element {
export default function RootLayout({
children,
}: TuonoLayoutProps): JSX.Element {
return (
<html>
<head>
+1 -1
View File
@@ -13,4 +13,4 @@ export {
export { TuonoScripts } from './shared/TuonoScripts'
export type { TuonoRouteProps } from './types'
export type { TuonoRouteProps, TuonoLayoutProps } from './types'
+6
View File
@@ -1,3 +1,5 @@
import type { ReactNode } from 'react'
/**
* Provided by the rust server and used in the ssr env
* @see tuono-router {@link ServerInitialLocation}
@@ -56,3 +58,7 @@ export type TuonoRouteProps<TData> =
data: TData
isLoading: false
}
export interface TuonoLayoutProps {
children: ReactNode
}