|
|
@ -14,6 +14,7 @@ import Settings from '../components/Settings'
|
|
|
|
import Toolbar from '../components/Toolbar'
|
|
|
|
import Toolbar from '../components/Toolbar'
|
|
|
|
import Overlay from '../components/Overlay'
|
|
|
|
import Overlay from '../components/Overlay'
|
|
|
|
import Carbon from '../components/Carbon'
|
|
|
|
import Carbon from '../components/Carbon'
|
|
|
|
|
|
|
|
import ArrowDown from '../components/svg/Arrowdown'
|
|
|
|
import api from '../lib/api'
|
|
|
|
import api from '../lib/api'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
THEMES,
|
|
|
|
THEMES,
|
|
|
@ -75,6 +76,7 @@ class Editor extends React.Component {
|
|
|
|
paddingHorizontal: '32px',
|
|
|
|
paddingHorizontal: '32px',
|
|
|
|
uploading: false,
|
|
|
|
uploading: false,
|
|
|
|
code: props.content,
|
|
|
|
code: props.content,
|
|
|
|
|
|
|
|
saveAs: 'png',
|
|
|
|
_initialState: this.props.initialState
|
|
|
|
_initialState: this.props.initialState
|
|
|
|
},
|
|
|
|
},
|
|
|
|
this.props.initialState
|
|
|
|
this.props.initialState
|
|
|
@ -190,15 +192,15 @@ class Editor extends React.Component {
|
|
|
|
style={{ marginRight: '8px' }}
|
|
|
|
style={{ marginRight: '8px' }}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
onClick={e => this.save()}
|
|
|
|
onClick={e => this.save({ format: this.state.saveAs })}
|
|
|
|
title="Save Image (PNG)"
|
|
|
|
title="Save Image"
|
|
|
|
color="#c198fb"
|
|
|
|
color="#c198fb"
|
|
|
|
style={{ marginRight: '8px' }}
|
|
|
|
style={{ marginRight: '8px' }}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<Button
|
|
|
|
<Dropdown
|
|
|
|
onClick={e => this.save({ format: 'svg' })}
|
|
|
|
selected={{ id: this.state.saveAs, name: `(${this.state.saveAs.toUpperCase()})` }}
|
|
|
|
title="Save Vector (SVG)"
|
|
|
|
list={['png', 'svg'].map(id => ({ id, name: id.toUpperCase() }))}
|
|
|
|
color="#9fca56"
|
|
|
|
onChange={saveAs => this.setState({ saveAs: saveAs.id })}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</Toolbar>
|
|
|
|
</Toolbar>
|
|
|
|