-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathStageFrame.tsx
More file actions
43 lines (40 loc) · 900 Bytes
/
StageFrame.tsx
File metadata and controls
43 lines (40 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import type { ReactNode } from 'react'
import { Link } from 'react-router-dom'
type StageFrameProps = {
title: string
subtitle: string
stack: string
controls?: ReactNode
legend?: ReactNode
children: ReactNode
}
export function StageFrame({
title,
subtitle,
stack,
controls,
legend,
children,
}: StageFrameProps) {
return (
<main className="stage-page">
<header className="stage-header">
<div>
<Link className="ghost-link" to="/">
返回总览
</Link>
<h1>{title}</h1>
<p>{subtitle}</p>
</div>
<div className="stage-stack">{stack}</div>
</header>
<section className="stage-body">
<div className="stage-canvas-card">{children}</div>
<aside className="stage-sidebar">
{controls}
{legend}
</aside>
</section>
</main>
)
}