Skip to content

Commit f901eb8

Browse files
authored
feat(playground): make named-layouts visually easier to identify (#296)
Added horizontal CSS bars to make it easier for humans to see changes the named-layouts playground. <img width="1454" height="354" alt="image" src="https://github.com/user-attachments/assets/d1100822-b5dd-4bca-a9ed-004573163027" /> Co-authored-by: mdong <mdong@cloudflare.com>
1 parent aa7dd5e commit f901eb8

4 files changed

Lines changed: 72 additions & 4 deletions

File tree

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
11
export default function LandingLayout({ children }: { children: React.ReactNode }) {
2-
return <div data-layout="landing">{children}</div>;
2+
return (
3+
<div data-layout="landing" style={{ minHeight: '100vh', margin: -8 }}>
4+
<header
5+
style={{
6+
boxSizing: 'border-box',
7+
width: '100%',
8+
padding: '16px 24px',
9+
background: '#305CDE',
10+
color: '#ffffff',
11+
fontWeight: 700,
12+
textAlign: 'center',
13+
}}
14+
>
15+
Landing
16+
</header>
17+
<main style={{ padding: 16 }}>{children}</main>
18+
</div>
19+
);
320
}
Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
11
export default function ApiLayout({ children }: { children: React.ReactNode }) {
2-
return <div data-layout="api">{children}</div>;
2+
return (
3+
<div data-layout="api" style={{ minHeight: '100vh', margin: -8 }}>
4+
<header
5+
style={{
6+
boxSizing: 'border-box',
7+
width: '100%',
8+
padding: '16px 24px',
9+
background: '#006400',
10+
color: '#ffffff',
11+
fontWeight: 700,
12+
textAlign: 'center',
13+
}}
14+
>
15+
API
16+
</header>
17+
<main style={{ padding: 16 }}>{children}</main>
18+
</div>
19+
);
320
}
Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
11
export default function DocsLayout({ children }: { children: React.ReactNode }) {
2-
return <div data-layout="docs">{children}</div>;
2+
return (
3+
<div data-layout="docs" style={{ minHeight: '100vh', margin: -8 }}>
4+
<header
5+
style={{
6+
boxSizing: 'border-box',
7+
width: '100%',
8+
padding: '16px 24px',
9+
background: '#FFCE1B',
10+
color: '#ffffff',
11+
fontWeight: 700,
12+
textAlign: 'center',
13+
}}
14+
>
15+
Docs
16+
</header>
17+
<main style={{ padding: 16 }}>{children}</main>
18+
</div>
19+
);
320
}
Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
11
export default function RootLayout({ children }: { children: React.ReactNode }) {
2-
return <div data-layout="root">{children}</div>;
2+
return (
3+
<div data-layout="root" style={{ minHeight: '100vh', margin: -8 }}>
4+
<header
5+
style={{
6+
boxSizing: 'border-box',
7+
width: '100%',
8+
padding: '16px 24px',
9+
background: '#dc2626',
10+
color: '#ffffff',
11+
fontWeight: 700,
12+
textAlign: 'center',
13+
}}
14+
>
15+
Layout
16+
</header>
17+
<main style={{ padding: 16 }}>{children}</main>
18+
</div>
19+
);
320
}

0 commit comments

Comments
 (0)