File tree Expand file tree Collapse file tree 4 files changed +29
-5
lines changed Expand file tree Collapse file tree 4 files changed +29
-5
lines changed Original file line number Diff line number Diff line change @@ -37,3 +37,23 @@ function bar() {
37
37
```
38
38
39
39
</CH.Code >
40
+
41
+ two panels:
42
+
43
+ <CH.Code >
44
+
45
+ ``` js foo.js
46
+ function foo () {
47
+ return 2
48
+ }
49
+ ```
50
+
51
+ ---
52
+
53
+ ``` js bar.js
54
+ function bar () {
55
+ return 2
56
+ }
57
+ ```
58
+
59
+ </CH.Code >
Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ type EditorFrameProps = {
30
30
theme : EditorTheme
31
31
terminalPanel ?: React . ReactNode
32
32
height ?: number
33
- button ?: React . ReactNode
33
+ northButton ?: React . ReactNode
34
+ southButton ?: React . ReactNode
34
35
classes ?: Classes
35
36
onTabClick ?: ( filename : string ) => void
36
37
} & React . PropsWithoutRef < JSX . IntrinsicElements [ "div" ] >
@@ -45,7 +46,8 @@ export const EditorFrame = React.forwardRef<
45
46
terminalPanel,
46
47
style,
47
48
height,
48
- button,
49
+ northButton,
50
+ southButton,
49
51
theme,
50
52
className,
51
53
onTabClick,
@@ -70,7 +72,7 @@ export const EditorFrame = React.forwardRef<
70
72
< TabsContainer
71
73
tabs = { northPanel . tabs }
72
74
showFrameButtons = { true }
73
- button = { button }
75
+ button = { northButton }
74
76
panel = "north"
75
77
theme = { theme }
76
78
onTabClick = { onTabClick }
@@ -92,6 +94,7 @@ export const EditorFrame = React.forwardRef<
92
94
< TabsContainer
93
95
tabs = { southPanel . tabs }
94
96
showFrameButtons = { false }
97
+ button = { southButton }
95
98
topBorder = { true }
96
99
panel = "south"
97
100
theme = { theme }
Original file line number Diff line number Diff line change @@ -108,8 +108,8 @@ function EditorTween({
108
108
southPanel = { southPanel }
109
109
terminalPanel = { terminalPanel }
110
110
theme = { codeConfig . theme }
111
- // TODO same for south
112
- button = { < CopyButton content = { northContent } /> }
111
+ northButton = { < CopyButton content = { northContent } /> }
112
+ southButton = { < CopyButton content = { southContent } /> }
113
113
/>
114
114
)
115
115
}
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export function CopyButton({
17
17
viewBox = "0 0 24 24"
18
18
xmlns = "http://www.w3.org/2000/svg"
19
19
>
20
+ < title > Copy</ title >
20
21
< path
21
22
strokeLinecap = "round"
22
23
strokeLinejoin = "round"
You can’t perform that action at this time.
0 commit comments