diff --git a/components/Overlay.js b/components/Overlay.js
new file mode 100644
index 0000000..bda431b
--- /dev/null
+++ b/components/Overlay.js
@@ -0,0 +1,27 @@
+const Overlay = props => (
+
- { props.isOver ?
Drop your file here to import
: null }
- {props.children}
-
+
+ {
+ React.Children.only(React.Children.map(
+ props.children,
+ child => React.cloneElement(child, { isOver: props.isOver }),
+ )[0])
+ }
)
diff --git a/pages/editor.js b/pages/editor.js
index 20331e7..fb61928 100644
--- a/pages/editor.js
+++ b/pages/editor.js
@@ -6,6 +6,7 @@ import domtoimage from 'dom-to-image'
import Page from '../components/Page'
import ReadFileDropContainer from '../components/ReadFileDropContainer'
import Toolbar from '../components/Toolbar'
+import Overlay from '../components/Overlay'
import Carbon from '../components/Carbon'
import api from '../lib/api'
import { THEMES, LANGUAGES, COLORS, DEFAULT_CODE } from '../lib/constants'
@@ -95,9 +96,11 @@ class Editor extends React.Component {
this.setState({ droppedContent })}
>
-
- {this.state.droppedContent || this.props.content || DEFAULT_CODE}
-
+
+
+ {this.state.droppedContent || this.props.content || DEFAULT_CODE}
+
+