make carbon the file drop target

main
Jake Dexheimer 7 years ago
parent 45bb7efbfb
commit 60c92fe07f

@ -80,9 +80,6 @@ class Editor extends React.Component {
render () { render () {
return ( return (
<Page enableHeroText> <Page enableHeroText>
<ReadFileDropContainer
onDrop={droppedContent => this.setState({ droppedContent })}
>
<div id="editor"> <div id="editor">
<Toolbar <Toolbar
save={this.save} save={this.save}
@ -95,11 +92,15 @@ class Editor extends React.Component {
bg={this.state.background} bg={this.state.background}
enabled={this.state} enabled={this.state}
/> />
<ReadFileDropContainer
onDrop={droppedContent => this.setState({ droppedContent })}
>
<Carbon config={this.state}> <Carbon config={this.state}>
{this.state.droppedContent || this.props.content || DEFAULT_CODE} {this.state.droppedContent || this.props.content || DEFAULT_CODE}
</Carbon> </Carbon>
</div>
</ReadFileDropContainer> </ReadFileDropContainer>
</div>
<style jsx>{` <style jsx>{`
#editor { #editor {
background: ${COLORS.BLACK}; background: ${COLORS.BLACK};

Loading…
Cancel
Save