Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { ConfigurationFile } from '@codesandbox/common/lib/templates/configuration/types';
import { withTheme } from 'styled-components';
import { ThemeProvider } from '@codesandbox/components';
import getUI from '@codesandbox/common/lib/templates/configuration/ui';
import theme from '@codesandbox/common/lib/theme';
import { Module } from '@codesandbox/common/lib/types';
Expand All @@ -23,9 +25,10 @@ type Props = EditorProps & {
onChangeVSCode: (val: string) => void;
onDispose: (cb: () => void) => void;
openText: () => void;
theme: any;
};

export class Configuration extends React.PureComponent<Props>
export class ConfigurationComponent extends React.PureComponent<Props>
implements Editor {
disposeInitializer: Function;
currentModule: Module;
Expand Down Expand Up @@ -147,13 +150,16 @@ export class Configuration extends React.PureComponent<Props>
More info...
</a>
</Description>

<ConfigWizard
sandbox={sandbox}
updateFile={this.updateFile}
file={this.props.getCode()}
/>
<ThemeProvider theme={this.props.theme.vscodeTheme}>
<ConfigWizard
sandbox={sandbox}
updateFile={this.updateFile}
file={this.props.getCode()}
/>
</ThemeProvider>
</Container>
);
}
}

export const Configuration = withTheme(ConfigurationComponent);
8 changes: 8 additions & 0 deletions packages/common/src/templates/configuration/elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ export const PaddedPreference = (styled(Preference)`
width: 100%;
padding: 0;
font-weight: 400;

span[data-component='SwitchToggle'] {
top: 1px;
}

input[type='checkbox']:focus {
display: none;
}
` as unknown) as typeof Preference;

export const PaddedConfig = styled.div`
Expand Down
2 changes: 0 additions & 2 deletions packages/common/src/templates/configuration/prettierRC/ui.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

import {
ConfigDescription,
PaddedConfig,
Expand Down Expand Up @@ -43,7 +42,6 @@ export class ConfigWizard extends React.Component<ConfigurationUIProps> {
if (!parsedFile) {
return <div>Could not parse .prettierrc</div>;
}

return (
<div>
<PaddedConfig>
Expand Down
96 changes: 0 additions & 96 deletions packages/homepage/src/pages/who-uses-codesandbox.js

This file was deleted.