|
|
@ -22,13 +22,9 @@ const CopyEmbed = withRouter(
|
|
|
|
({ router: { asPath } }) => (
|
|
|
|
({ router: { asPath } }) => (
|
|
|
|
<CopyButton text={toIFrame(asPath)}>
|
|
|
|
<CopyButton text={toIFrame(asPath)}>
|
|
|
|
{({ copied }) => (
|
|
|
|
{({ copied }) => (
|
|
|
|
<Button
|
|
|
|
<Button center color={COLORS.PURPLE} padding="12px 16px" flex="1 0 68px">
|
|
|
|
center
|
|
|
|
{copied ? 'Copied!' : 'Copy Embed'}
|
|
|
|
title={copied ? 'Copied!' : 'Copy Embed'}
|
|
|
|
</Button>
|
|
|
|
color={COLORS.PURPLE}
|
|
|
|
|
|
|
|
padding="12px 16px"
|
|
|
|
|
|
|
|
flex="1 0 68px"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
</CopyButton>
|
|
|
|
</CopyButton>
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -64,12 +60,13 @@ class ExportMenu extends React.PureComponent {
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
border
|
|
|
|
border
|
|
|
|
large
|
|
|
|
large
|
|
|
|
title="Export"
|
|
|
|
|
|
|
|
color={COLORS.PURPLE}
|
|
|
|
color={COLORS.PURPLE}
|
|
|
|
padding="0 16px"
|
|
|
|
padding="0 16px"
|
|
|
|
selected={isVisible}
|
|
|
|
selected={isVisible}
|
|
|
|
onClick={this.toggle}
|
|
|
|
onClick={this.toggle}
|
|
|
|
/>
|
|
|
|
>
|
|
|
|
|
|
|
|
Export
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<Popout
|
|
|
|
<Popout
|
|
|
|
hidden={!isVisible}
|
|
|
|
hidden={!isVisible}
|
|
|
@ -96,36 +93,41 @@ class ExportMenu extends React.PureComponent {
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
center
|
|
|
|
center
|
|
|
|
key={name}
|
|
|
|
key={name}
|
|
|
|
title={name}
|
|
|
|
|
|
|
|
hoverColor={COLORS.PURPLE}
|
|
|
|
hoverColor={COLORS.PURPLE}
|
|
|
|
margin={i === EXPORT_SIZES.length - 1 ? 0 : '0 10px 0 0'}
|
|
|
|
margin={i === EXPORT_SIZES.length - 1 ? 0 : '0 10px 0 0'}
|
|
|
|
color={exportSize === name ? COLORS.PURPLE : COLORS.DARK_PURPLE}
|
|
|
|
color={exportSize === name ? COLORS.PURPLE : COLORS.DARK_PURPLE}
|
|
|
|
onClick={this.handleExportSizeChange(name)}
|
|
|
|
onClick={this.handleExportSizeChange(name)}
|
|
|
|
/>
|
|
|
|
>
|
|
|
|
|
|
|
|
{name}
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="export-row">
|
|
|
|
<div className="export-row">
|
|
|
|
<Button center title="Open" color={COLORS.PURPLE} onClick={this.handleExport('open')} />
|
|
|
|
<Button center color={COLORS.PURPLE} onClick={this.handleExport('open')}>
|
|
|
|
|
|
|
|
Open
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
<CopyEmbed />
|
|
|
|
<CopyEmbed />
|
|
|
|
<div className="save-container">
|
|
|
|
<div className="save-container">
|
|
|
|
<span>Save as</span>
|
|
|
|
<span>Save as</span>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
center
|
|
|
|
center
|
|
|
|
title="PNG"
|
|
|
|
|
|
|
|
margin="0 8px 0 0"
|
|
|
|
margin="0 8px 0 0"
|
|
|
|
hoverColor={COLORS.PURPLE}
|
|
|
|
hoverColor={COLORS.PURPLE}
|
|
|
|
color={COLORS.DARK_PURPLE}
|
|
|
|
color={COLORS.DARK_PURPLE}
|
|
|
|
onClick={this.handleExport('png')}
|
|
|
|
onClick={this.handleExport('png')}
|
|
|
|
/>
|
|
|
|
>
|
|
|
|
|
|
|
|
PNG
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
center
|
|
|
|
center
|
|
|
|
title="SVG"
|
|
|
|
|
|
|
|
hoverColor={COLORS.PURPLE}
|
|
|
|
hoverColor={COLORS.PURPLE}
|
|
|
|
color={COLORS.DARK_PURPLE}
|
|
|
|
color={COLORS.DARK_PURPLE}
|
|
|
|
onClick={this.handleExport('svg')}
|
|
|
|
onClick={this.handleExport('svg')}
|
|
|
|
/>
|
|
|
|
>
|
|
|
|
|
|
|
|
SVG
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|