import React from 'react' import { withRouter } from 'next/router' import { COLORS, EXPORT_SIZES } from '../lib/constants' import Button from './Button' import Input from './Input' import CopyButton from './CopyButton' import Popout, { managePopout } from './Popout' const toIFrame = url => ` ` const CopyEmbed = withRouter( React.memo( ({ router: { asPath } }) => ( {({ copied }) => ( )} ), (prevProps, nextProps) => prevProps.router.asPath === nextProps.router.asPath ) ) const popoutStyle = { width: '280px', right: 0 } class ExportMenu extends React.PureComponent { handleInputChange = ({ target: { name, value } }) => this.props.onChange(name, value) handleExportSizeChange = selectedSize => () => this.props.onChange('exportSize', selectedSize) handleExport = format => () => this.props.export(format) render() { const { exportSize, filename, isVisible, toggleVisibility } = this.props return (
) } } export default managePopout(ExportMenu)