diff --git a/app/react/package.json b/app/react/package.json index 2fa1a3105f1..06e0bc9732f 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -35,7 +35,6 @@ "@storybook/core": "4.0.0-alpha.21", "babel-plugin-react-docgen": "^2.0.0-babel7.0", "common-tags": "^1.8.0", - "emotion": "^9.2.6", "global": "^4.3.2", "lodash.flattendeep": "^4.4.0", "prop-types": "^15.6.2", diff --git a/docs/src/pages/addons/writing-addons/index.md b/docs/src/pages/addons/writing-addons/index.md index e67cc74e41b..d069f854c69 100644 --- a/docs/src/pages/addons/writing-addons/index.md +++ b/docs/src/pages/addons/writing-addons/index.md @@ -118,7 +118,7 @@ Then add the following code to the register.js. ```js import React from 'react'; import addons from '@storybook/addons'; -import styled from 'emotion'; +import styled from '@emotion/styled'; const NotesPanel = styled.div({ margin: 10, diff --git a/lib/ui/package.json b/lib/ui/package.json index 94b7438bc76..7fb17d38b1e 100644 --- a/lib/ui/package.json +++ b/lib/ui/package.json @@ -35,7 +35,6 @@ "@storybook/podda": "^1.2.3", "@storybook/react-komposer": "^2.0.4", "deep-equal": "^1.0.1", - "emotion": "^9.2.8", "events": "^3.0.0", "fuse.js": "^3.2.1", "global": "^4.3.2", diff --git a/lib/ui/src/modules/ui/components/search_box.js b/lib/ui/src/modules/ui/components/search_box.js index 46f0003f36e..1ce229ba97a 100644 --- a/lib/ui/src/modules/ui/components/search_box.js +++ b/lib/ui/src/modules/ui/components/search_box.js @@ -5,8 +5,7 @@ import { polyfill } from 'react-lifecycles-compat'; import ReactModal from 'react-modal'; import FuzzySearch from 'react-fuzzy'; -import { withCSSContext } from '@emotion/core'; -import { css } from 'emotion'; +import { css, withCSSContext } from '@emotion/core'; const formatStories = stories => { const formattedStories = []; @@ -102,25 +101,29 @@ class SearchBox extends React.Component { isOpen={showSearchBox} onAfterOpen={this.onModalOpen} onRequestClose={onClose} - className={css({ - fontSize: theme.mainTextColor, - fontFamily: theme.mainTextFace, - color: theme.mainTextColor, - })} - overlayClassName={css({ - position: 'fixed', - height: '100vh', - width: '100vw', - display: 'flex', - alignItems: 'center', - justifyContent: 'center', - top: 0, - left: 0, - right: 0, - bottom: 0, - background: theme.overlayBackground, - zIndex: 1, - })} + className={ + css({ + fontSize: theme.mainTextColor, + fontFamily: theme.mainTextFace, + color: theme.mainTextColor, + }).name + } + overlayClassName={ + css({ + position: 'fixed', + height: '100vh', + width: '100vw', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + top: 0, + left: 0, + right: 0, + bottom: 0, + background: theme.overlayBackground, + zIndex: 1, + }).name + } contentLabel="Search" shouldReturnFocusAfterClose={false} > diff --git a/lib/ui/src/modules/ui/components/shortcuts_help.js b/lib/ui/src/modules/ui/components/shortcuts_help.js index a63545be90d..062d4b78361 100755 --- a/lib/ui/src/modules/ui/components/shortcuts_help.js +++ b/lib/ui/src/modules/ui/components/shortcuts_help.js @@ -1,10 +1,9 @@ import PropTypes from 'prop-types'; import React from 'react'; import styled from '@emotion/styled'; -import { withCSSContext } from '@emotion/core'; -import { css } from 'emotion'; import ReactModal from 'react-modal'; +import { css, withCSSContext } from '@emotion/core'; const Command = styled.b( ({ isLast, isFirst, theme }) => { @@ -140,32 +139,36 @@ function ShortcutsHelp({ isOpen, onClose, platform }, { theme }) { diff --git a/yarn.lock b/yarn.lock index 158b4b85749..1b7b3ddf747 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6741,7 +6741,7 @@ emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" -emotion@9.2.8, emotion@^9.2.6, emotion@^9.2.8: +emotion@9.2.8: version "9.2.8" resolved "https://registry.yarnpkg.com/emotion/-/emotion-9.2.8.tgz#b89e754be1a109f4e47ff0031928f94e40d7984a" dependencies: