File tree Expand file tree Collapse file tree 4 files changed +21
-105
lines changed
app/src/app/components/CodeEditor/VSCode/Configuration
common/src/templates/configuration Expand file tree Collapse file tree 4 files changed +21
-105
lines changed Original file line number Diff line number Diff line change 11import { ConfigurationFile } from '@codesandbox/common/lib/templates/configuration/types' ;
2+ import { withTheme } from 'styled-components' ;
3+ import { ThemeProvider } from '@codesandbox/components' ;
24import getUI from '@codesandbox/common/lib/templates/configuration/ui' ;
35import theme from '@codesandbox/common/lib/theme' ;
46import { Module } from '@codesandbox/common/lib/types' ;
@@ -23,9 +25,10 @@ type Props = EditorProps & {
2325 onChangeVSCode : ( val : string ) => void ;
2426 onDispose : ( cb : ( ) => void ) => void ;
2527 openText : ( ) => void ;
28+ theme : any ;
2629} ;
2730
28- export class Configuration extends React . PureComponent < Props >
31+ export class ConfigurationComponent extends React . PureComponent < Props >
2932 implements Editor {
3033 disposeInitializer : Function ;
3134 currentModule : Module ;
@@ -147,13 +150,16 @@ export class Configuration extends React.PureComponent<Props>
147150 More info...
148151 </ a >
149152 </ Description >
150-
151- < ConfigWizard
152- sandbox = { sandbox }
153- updateFile = { this . updateFile }
154- file = { this . props . getCode ( ) }
155- />
153+ < ThemeProvider theme = { this . props . theme . vscodeTheme } >
154+ < ConfigWizard
155+ sandbox = { sandbox }
156+ updateFile = { this . updateFile }
157+ file = { this . props . getCode ( ) }
158+ />
159+ </ ThemeProvider >
156160 </ Container >
157161 ) ;
158162 }
159163}
164+
165+ export const Configuration = withTheme ( ConfigurationComponent ) ;
Original file line number Diff line number Diff line change @@ -6,6 +6,14 @@ export const PaddedPreference = (styled(Preference)`
66 width: 100%;
77 padding: 0;
88 font-weight: 400;
9+
10+ span[data-component='SwitchToggle'] {
11+ top: 1px;
12+ }
13+
14+ input[type='checkbox']:focus {
15+ display: none;
16+ }
917` as unknown ) as typeof Preference ;
1018
1119export const PaddedConfig = styled . div `
Original file line number Diff line number Diff line change 11import React from 'react' ;
2-
32import {
43 ConfigDescription ,
54 PaddedConfig ,
@@ -43,7 +42,6 @@ export class ConfigWizard extends React.Component<ConfigurationUIProps> {
4342 if ( ! parsedFile ) {
4443 return < div > Could not parse .prettierrc</ div > ;
4544 }
46-
4745 return (
4846 < div >
4947 < PaddedConfig >
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments