export -> exportImage

main
Mike Fix 5 years ago
parent fff9dd4c6e
commit acf91b088a
No known key found for this signature in database
GPG Key ID: 1D85E862314CA79F

@ -54,7 +54,7 @@ class Editor extends React.Component {
loading: true loading: true
} }
this.export = this.export.bind(this) this.export = this.exportImage.bind(this)
this.upload = this.upload.bind(this) this.upload = this.upload.bind(this)
this.updateSetting = this.updateSetting.bind(this) this.updateSetting = this.updateSetting.bind(this)
this.updateLanguage = this.updateLanguage.bind(this) this.updateLanguage = this.updateLanguage.bind(this)
@ -223,7 +223,7 @@ class Editor extends React.Component {
} }
} }
export(format = 'png', options = {}) { exportImage(format = 'png', options = {}) {
const link = document.createElement('a') const link = document.createElement('a')
const prefix = options.filename || 'carbon' const prefix = options.filename || 'carbon'
@ -396,7 +396,7 @@ class Editor extends React.Component {
<TweetButton onClick={this.upload} /> <TweetButton onClick={this.upload} />
<ExportMenu <ExportMenu
onChange={this.updateSetting} onChange={this.updateSetting}
export={this.export} exportImage={this.exportImage}
exportSize={exportSize} exportSize={exportSize}
backgroundImage={backgroundImage} backgroundImage={backgroundImage}
/> />

@ -67,7 +67,7 @@ function ExportMenu({
exportSize, exportSize,
isVisible, isVisible,
toggleVisibility, toggleVisibility,
export: exportImage exportImage
}) { }) {
const tooLarge = React.useMemo(() => !verifyPayloadSize(backgroundImage), [backgroundImage]) const tooLarge = React.useMemo(() => !verifyPayloadSize(backgroundImage), [backgroundImage])
const online = useOnline() const online = useOnline()

Loading…
Cancel
Save