|
|
@ -45,14 +45,19 @@ const CopyEmbed = withRouter(({ router: { asPath }, mapper, title, margin }) =>
|
|
|
|
const popoutStyle = { width: '280px', right: 0 }
|
|
|
|
const popoutStyle = { width: '280px', right: 0 }
|
|
|
|
|
|
|
|
|
|
|
|
class ExportMenu extends React.PureComponent {
|
|
|
|
class ExportMenu extends React.PureComponent {
|
|
|
|
|
|
|
|
input = React.createRef()
|
|
|
|
|
|
|
|
|
|
|
|
handleInputChange = ({ target: { name, value } }) => this.props.onChange(name, value)
|
|
|
|
handleInputChange = ({ target: { name, value } }) => this.props.onChange(name, value)
|
|
|
|
|
|
|
|
|
|
|
|
handleExportSizeChange = selectedSize => () => this.props.onChange('exportSize', selectedSize)
|
|
|
|
handleExportSizeChange = selectedSize => () => this.props.onChange('exportSize', selectedSize)
|
|
|
|
|
|
|
|
|
|
|
|
handleExport = format => () => this.props.export(format)
|
|
|
|
handleExport = format => () =>
|
|
|
|
|
|
|
|
this.props.export(format, {
|
|
|
|
|
|
|
|
filename: this.input.current.value
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
const { exportSize, filename, isVisible, toggleVisibility, disablePNG } = this.props
|
|
|
|
const { exportSize, isVisible, toggleVisibility, disablePNG } = this.props
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div className="export-menu-container" id="export-menu">
|
|
|
|
<div className="export-menu-container" id="export-menu">
|
|
|
@ -77,14 +82,7 @@ class ExportMenu extends React.PureComponent {
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<div className="export-row">
|
|
|
|
<div className="export-row">
|
|
|
|
<span className="filename">File name</span>
|
|
|
|
<span className="filename">File name</span>
|
|
|
|
<Input
|
|
|
|
<Input ref={this.input} title="filename" placeholder="carbon" color={COLORS.PURPLE} />
|
|
|
|
title="filename"
|
|
|
|
|
|
|
|
placeholder="carbon"
|
|
|
|
|
|
|
|
value={filename}
|
|
|
|
|
|
|
|
name="filename"
|
|
|
|
|
|
|
|
onChange={this.handleInputChange}
|
|
|
|
|
|
|
|
color={COLORS.PURPLE}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="export-row">
|
|
|
|
<div className="export-row">
|
|
|
|
<span>Size</span>
|
|
|
|
<span>Size</span>
|
|
|
|