@@ -3,66 +3,10 @@ import { h } from "hyperapp"
33import { State , Actions , PaneDisplay } from "../api"
44
55import { DebuggerOptions } from "./DebuggerOptions"
6+ import { DebugPaneToolbar } from "./DebugPaneToolbar"
67
78import "./DebugPane.scss"
89
9- interface ToolbarProps {
10- state : State
11- actions : Actions
12- }
13-
14- function Toolbar ( props : ToolbarProps ) {
15- const { state, actions } = props
16- return (
17- < div class = "debug-toolbar" >
18- < div class = "dropdown" >
19- < button class = "btn btn-link dropdown-toggle" > View</ button >
20- < ul class = "menu" >
21- < li class = "menu-item" >
22- < a
23- href = ""
24- onclick = { e => {
25- actions . setPaneDisplay ( "fullscreen" )
26- e . preventDefault ( )
27- } }
28- >
29- Full Screen
30- </ a >
31- </ li >
32- < li class = "menu-item" >
33- < a
34- href = ""
35- onclick = { e => {
36- actions . setPaneDisplay ( "right" )
37- e . preventDefault ( )
38- } }
39- >
40- Align Right
41- </ a >
42- </ li >
43- < li class = "menu-item" >
44- < a
45- href = ""
46- onclick = { e => {
47- actions . setPaneDisplay ( "bottom" )
48- e . preventDefault ( )
49- } }
50- >
51- Align Bottom
52- </ a >
53- </ li >
54- </ ul >
55- </ div >
56- < span class = "float-right" >
57- < button
58- class = "btn btn-clear close-button"
59- onclick = { ( ) => actions . showPane ( false ) }
60- />
61- </ span >
62- </ div >
63- )
64- }
65-
6610export interface DebugPaneProps {
6711 state : State
6812 actions : Actions
@@ -73,7 +17,7 @@ export function DebugPane(props: DebugPaneProps) {
7317
7418 return (
7519 < div class = "debug-pane" >
76- { Toolbar ( { state, actions } ) }
20+ { DebugPaneToolbar ( { state, actions } ) }
7721 { DebuggerOptions ( { state, actions } ) }
7822 < div class = "debug-content scrollable" >
7923 < pre class = "scrollable-content" > { JSON . stringify ( state , null , 2 ) } </ pre >
0 commit comments