Update where spinner occurs

main
Mike Fix 6 years ago committed by Michael Fix
parent cd5205b1b8
commit 7fd9ecf829

@ -4,8 +4,9 @@ import * as hljs from 'highlight.js'
import debounce from 'lodash.debounce' import debounce from 'lodash.debounce'
import ms from 'ms' import ms from 'ms'
import { Controlled as CodeMirror } from 'react-codemirror2' import { Controlled as CodeMirror } from 'react-codemirror2'
import SpinnerWrapper from './SpinnerWrapper'
import WindowControls from '../components/WindowControls' import WindowControls from './WindowControls'
import { import {
COLORS, COLORS,
LANGUAGE_MODE_HASH, LANGUAGE_MODE_HASH,
@ -14,7 +15,7 @@ import {
DEFAULT_SETTINGS DEFAULT_SETTINGS
} from '../lib/constants' } from '../lib/constants'
const Watermark = dynamic(() => import('../components/svg/Watermark'), { const Watermark = dynamic(() => import('./svg/Watermark'), {
loading: () => null loading: () => null
}) })
@ -223,7 +224,7 @@ class Carbon extends React.PureComponent {
return ( return (
<div className="section"> <div className="section">
<div className="export-container" ref={this.props.innerRef} id="export-container"> <div className="export-container" ref={this.props.innerRef} id="export-container">
{content} <SpinnerWrapper>{content}</SpinnerWrapper>
<div className="twitter-png-fix" /> <div className="twitter-png-fix" />
</div> </div>
<style jsx> <style jsx>

@ -14,7 +14,6 @@ import Carbon from './Carbon'
import ExportMenu from './ExportMenu' import ExportMenu from './ExportMenu'
import Themes from './Themes' import Themes from './Themes'
import TweetButton from './TweetButton' import TweetButton from './TweetButton'
import SpinnerWrapper from './SpinnerWrapper'
import { import {
LANGUAGES, LANGUAGES,
LANGUAGE_MIME_HASH, LANGUAGE_MIME_HASH,
@ -285,7 +284,7 @@ class Editor extends React.Component {
const config = omit(this.state, ['code', 'aspectRatio', 'titleBar']) const config = omit(this.state, ['code', 'aspectRatio', 'titleBar'])
return ( return (
<SpinnerWrapper> <>
<div className="editor"> <div className="editor">
<Toolbar> <Toolbar>
<Themes key={theme} updateTheme={this.updateTheme} theme={theme} /> <Themes key={theme} updateTheme={this.updateTheme} theme={theme} />
@ -363,7 +362,7 @@ class Editor extends React.Component {
} }
`} `}
</style> </style>
</SpinnerWrapper> </>
) )
} }
} }

@ -15,7 +15,8 @@ export default function SpinnerWrapper(props) {
<style jsx> <style jsx>
{` {`
div { div {
height: 160px; width: 876px;
height: 240px;
} }
`} `}
</style> </style>

Loading…
Cancel
Save