make carbon the file drop target

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

@ -80,26 +80,27 @@ class Editor extends React.Component {
render () { render () {
return ( return (
<Page enableHeroText> <Page enableHeroText>
<ReadFileDropContainer <div id="editor">
onDrop={droppedContent => this.setState({ droppedContent })} <Toolbar
> save={this.save}
<div id="editor"> upload={this.upload}
<Toolbar uploading={this.state.uploading}
save={this.save} onBGChange={color => this.setState({ background: color })}
upload={this.upload} onThemeChange={theme => this.setState({ theme: theme.id })}
uploading={this.state.uploading} onLanguageChange={language => this.setState({ language: language.module })}
onBGChange={color => this.setState({ background: color })} onSettingsChange={(key, value) => this.setState({ [key]: value })}
onThemeChange={theme => this.setState({ theme: theme.id })} bg={this.state.background}
onLanguageChange={language => this.setState({ language: language.module })} enabled={this.state}
onSettingsChange={(key, value) => this.setState({ [key]: value })} />
bg={this.state.background} <ReadFileDropContainer
enabled={this.state} 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