Skip to content

Commit

Permalink
Update: wrap all examples in strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
aabenoja committed Dec 5, 2018
1 parent 14dcd3a commit d80411c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/es-components/src/styleguide/ExampleWrapper.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
/* eslint-disable react/prop-types */

import { createElement } from 'react';
import React, { createElement } from 'react';
import { ThemeProvider } from 'styled-components';
import viaTheme from 'es-components-via-theme';

export default function ExampleWrapper({ children }) {
return createElement(ThemeProvider, { theme: viaTheme }, children);
export default function ExampleWrapper(props) {
const WrapperType = React.StrictMode;
return createElement(WrapperType, {}, [
createElement(ThemeProvider, { theme: viaTheme }, props.children)
]);
}

0 comments on commit d80411c

Please sign in to comment.