Skip to content

Commit

Permalink
work on diagram and jsx mvp
Browse files Browse the repository at this point in the history
  • Loading branch information
zag committed Apr 11, 2021
1 parent 39f278c commit 139db8b
Show file tree
Hide file tree
Showing 7 changed files with 1,120 additions and 12 deletions.
42 changes: 42 additions & 0 deletions app/renderer/components/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import * as React from 'react'
import Editor from './EditorNG'
import './App.css';
import './Editor.scss'
import { useMemo } from 'react';
import toAny from 'pod6/built/exportAny'
import { parse } from 'pod6';
// import {AstToReact} from './ast-to-react'

const content = `
=begin Dia
graph LR
A --- B
B-->C[fa:fa-ban forbidden]
B-->D(fa:fa-spinner);
=end Dia
test
=begin Dia
graph LR
A --- B
B-->C[fa:fa-ban forbidden]
B-->D(fa:fa-spinner);
=end Dia
`


const onConvertSource = (src) => {
return src
// console.log(src)
// return AstToReact(src)
}
const App = ()=><Editor
isDarkTheme={false}
content={content}
onChangeSource={()=>{}}
sourceType={'pod6'}
onConvertSource={onConvertSource}
onSavePressed={()=>{}}
/>
export default App;
Loading

0 comments on commit 139db8b

Please sign in to comment.