From f7c81660d58714dd783d9a1360775e0879f53dd5 Mon Sep 17 00:00:00 2001 From: Matthias Dietrich Date: Thu, 17 May 2018 14:41:20 +0200 Subject: [PATCH] Update files with prettier changes --- src/components/code-pane.js | 27 ++++++++++++++------------- src/components/code-pane.test.js | 10 ++++++---- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/components/code-pane.js b/src/components/code-pane.js index 114c78f96..e5ed1f11d 100644 --- a/src/components/code-pane.js +++ b/src/components/code-pane.js @@ -7,12 +7,12 @@ import { Editor } from 'react-live'; import '../utils/prism-import'; const StyledWrapper = styled.div(props => props.styles); -const StyledEditor = styled(({ syntaxStyles: _, prismTheme: __, ...rest }) => )` +const StyledEditor = styled(({ syntaxStyles: _, prismTheme: __, ...rest }) => ( + +))` && { - ${props => props.syntaxStyles} - - &.builtin-prism-theme { - ${props => props.prismTheme} + ${props => props.syntaxStyles} &.builtin-prism-theme { + ${props => props.prismTheme}; } } `; @@ -25,7 +25,9 @@ export default class CodePane extends Component { render() { const useDarkTheme = this.props.theme === 'dark'; const externalPrismTheme = this.props.theme === 'external'; - const className = `language-${this.props.lang} ${externalPrismTheme ? '' : 'builtin-prism-theme'} ${this.props.className}`; + const className = `language-${this.props.lang} ${ + externalPrismTheme ? '' : 'builtin-prism-theme' + } ${this.props.className}`; const wrapperStyles = [ this.context.styles.components.codePane, @@ -34,17 +36,16 @@ export default class CodePane extends Component { ]; return ( - + ', () => { test('should render correctly.', () => { - const context = { styles: { - components: { codePane: {}, syntax: {} }, - prism: { light: 'light;', dark: 'dark;' } - } }; + const context = { + styles: { + components: { codePane: {}, syntax: {} }, + prism: { light: 'light;', dark: 'dark;' } + } + }; const source = ` const myButton = (