From e5b3d39d4ebde4805be413a7dd4f65fc2177ecd7 Mon Sep 17 00:00:00 2001 From: raboid Date: Mon, 7 Jan 2019 17:37:04 -0500 Subject: [PATCH] Update ExportMenu to use Popout, Button, Input --- components/ExportMenu.js | 262 ++++++++++++++------------------------- lib/constants.js | 1 + 2 files changed, 93 insertions(+), 170 deletions(-) diff --git a/components/ExportMenu.js b/components/ExportMenu.js index 9626c30..396c364 100644 --- a/components/ExportMenu.js +++ b/components/ExportMenu.js @@ -1,11 +1,11 @@ import React from 'react' -import enhanceWithClickOutside from 'react-click-outside' 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 WindowPointer from './WindowPointer' +import Popout from './Popout' import { toggle } from '../lib/util' @@ -20,53 +20,35 @@ const toIFrame = url => const CopyEmbed = withRouter( React.memo( ({ router: { asPath } }) => ( - - - {({ copied }) => ( - - )} - - - + + {({ copied }) => ( + - ))} - +
+ Size +
+ {EXPORT_SIZES.map(({ name }, i) => ( +
-
- +
+ - +
- + @@ -259,4 +181,4 @@ class ExportMenu extends React.PureComponent { } } -export default enhanceWithClickOutside(ExportMenu) +export default ExportMenu diff --git a/lib/constants.js b/lib/constants.js index 7d4b9ab..19fdcd7 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -488,6 +488,7 @@ export const COLORS = { DARK_GRAY: '#393939', HOVER: '#1F1F1F', PURPLE: '#C198FB', + DARK_PURPLE: '#55436F', RED: 'red' }