File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -219,6 +219,30 @@ export type GenericClassDecorator<T> = (target: T) => void;`,
219219 } ) ;
220220 }
221221 } ;
222+ const newPane = function ( ) {
223+ const key = shortRandomId ( ) ;
224+ const name = `pane-${ key } .ts` ;
225+ const tabData : IEditorTab = {
226+ id : `${ key } ` ,
227+ name,
228+ icon : 'selection' ,
229+ data : { } ,
230+ breadcrumb : [ { id : `${ key } ` , name } ] ,
231+ renderPane : ( tabData , tab , group ) => {
232+ console . log ( tabData , tab , group ) ;
233+ const style : React . CSSProperties = {
234+ display : 'flex' ,
235+ width : '100%' ,
236+ height : '100%' ,
237+ fontSize : 48 ,
238+ alignItems : 'center' ,
239+ justifyContent : 'center' ,
240+ } ;
241+ return < div style = { style } > { name } </ div > ;
242+ } ,
243+ } ;
244+ molecule . editor . open ( tabData ) ;
245+ } ;
222246
223247 const updateEntryPage = ( ) => {
224248 const style : React . CSSProperties = {
@@ -427,6 +451,7 @@ PARTITIONED BY (DE STRING) LIFECYCLE 1000;
427451 < Button onClick = { toggleEditorStatus } >
428452 Toggle Editor status
429453 </ Button >
454+ < Button onClick = { newPane } > New Pane</ Button >
430455 < Button onClick = { updateEntryPage } >
431456 Update Entry Page
432457 </ Button >
You can’t perform that action at this time.
0 commit comments