mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-25 12:52:47 -07:00
feat: add TuonoLayoutProps interface (#702)
This commit is contained in:
committed by
GitHub
parent
0fa83fb1a2
commit
0335c8c1ad
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -13,4 +13,4 @@ export {
|
||||
|
||||
export { TuonoScripts } from './shared/TuonoScripts'
|
||||
|
||||
export type { TuonoRouteProps } from './types'
|
||||
export type { TuonoRouteProps, TuonoLayoutProps } from './types'
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user