modify default settings constant, use new constant when setting initial settings

main
briandennis 7 years ago committed by Brian Dennis
parent 91cf4b7734
commit d62145f727

@ -420,17 +420,23 @@ if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') {
}
export const DEFAULT_SETTINGS = {
paddingVertical: '50px',
paddingHorizontal: '50px',
paddingVertical: '48px',
paddingHorizontal: '32px',
marginVertical: '45px',
marginHorizontal: '45px',
backgroundImage: null,
backgroundImageSelection: null,
backgroundMode: 'color',
backgroundColor: 'rgba(171, 184, 195, 1)',
backgroundColor: DEFAULT_BG_COLOR,
dropShadow: true,
dropShadowOffsetY: '20px',
dropShadowBlurRadius: '68px',
theme: 'seti',
theme: DEFAULT_THEME.id,
windowTheme: 'none',
language: DEFAULT_LANGUAGE,
fontFamily: 'Hack',
fontSize: '14px'
fontSize: '14px',
windowControls: true,
widthAdjustment: true,
lineNumbers: false
}

@ -61,20 +61,7 @@ class Editor extends React.Component {
super(props)
this.state = Object.assign(
{
backgroundMode: 'color',
backgroundColor: DEFAULT_BG_COLOR,
backgroundImage: null,
backgroundImageSelection: null,
theme: DEFAULT_THEME.id,
language: DEFAULT_LANGUAGE,
dropShadow: true,
dropShadowOffsetY: '20px',
dropShadowBlurRadius: '68px',
windowControls: true,
widthAdjustment: true,
lineNumbers: false,
paddingVertical: '48px',
paddingHorizontal: '32px',
...DEFAULT_SETTINGS,
uploading: false,
code: props.content,
_initialState: this.props.initialState

Loading…
Cancel
Save