@@ -2,18 +2,17 @@ import { IJGISStoryMap, IJupyterGISModel } from '@jupytergis/schema';
22import jgisSchema from '@jupytergis/schema/lib/schema/project/jgis.json' ;
33import React , { useMemo } from 'react' ;
44
5- import { StoryEditorForm } from '@/src/formbuilder/objectform/StoryForm ' ;
5+ import { BaseForm } from '@/src/formbuilder' ;
66import { deepCopy } from '@/src/tools' ;
77import { IDict } from '@/src/types' ;
88
99interface IStoryPanelProps {
1010 model : IJupyterGISModel ;
11- togglePreview : ( ) => void ;
1211}
1312
1413const storyMapSchema : IDict = deepCopy ( jgisSchema . definitions . jGISStoryMap ) ;
1514
16- export function StoryEditorPanel ( { model, togglePreview } : IStoryPanelProps ) {
15+ export function StoryEditorPanel ( { model } : IStoryPanelProps ) {
1716 const { landmarkId, story } = useMemo ( ( ) => {
1817 return model . getSelectedStory ( ) ;
1918 } , [ model , model . sharedModel . storiesMap ] ) ;
@@ -24,23 +23,21 @@ export function StoryEditorPanel({ model, togglePreview }: IStoryPanelProps) {
2423
2524 if ( ! story ) {
2625 return (
27- < div style = { { padding : '10px ' } } >
26+ < div style = { { padding : '0 0.5rem 0.5rem 0.5rem ' } } >
2827 < p > No story map available. Create one by adding a landmark.</ p >
2928 </ div >
3029 ) ;
3130 }
3231
3332 return (
34- < div style = { { padding : '10px' } } >
35- < h3 > Story Map Properties</ h3 >
36- < StoryEditorForm
33+ < div style = { { padding : '0 0.5rem 0.5rem 0.5rem' } } >
34+ < BaseForm
3735 formContext = "update"
3836 sourceData = { story }
3937 model = { model }
4038 schema = { storyMapSchema }
4139 syncData = { syncStoryData }
4240 filePath = { model . filePath }
43- togglePreview = { togglePreview }
4441 />
4542 </ div >
4643 ) ;
0 commit comments