Skip to content

Commit f6f9c74

Browse files
LaurentClaesclaude
andcommitted
Migrate styleguide from emotion v10 to @emotion/css v11
- Replace all `import { css } from 'emotion'` with `from '@emotion/css'` across 23 files (jsx, tsx, mdx) - Add @emotion/css as styleguide dependency - Remove emotion v10 from root devDependencies - Remove core-js from styleguide dependencies (no longer needed) - Keep emotion/create-emotion overrides for vanilla-drylus/extract-emotion Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3f9fa0b commit f6f9c74

25 files changed

Lines changed: 24 additions & 25 deletions

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181
"concurrently": "^9.0.0",
8282
"copy-webpack-plugin": "^14.0.0",
8383
"css-loader": "^7.0.0",
84-
"emotion": "10.0.27",
8584
"eslint": "^9.0.0",
8685
"eslint-formatter-pretty": "^5.0.0",
8786
"eslint-plugin-jest": "^29.0.0",

packages/styleguide/app/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Color, DrylusProvider, Layout, Page, Position } from '@drawbotics/react
44
import { useScreenSize } from '@drawbotics/use-screen-size';
55
// @ts-ignore
66
import drylus from '@drawbotics/vanilla-drylus/dist/drylus.js';
7-
import { css } from 'emotion';
7+
import { css } from '@emotion/css';
88
import React, { useState } from 'react';
99
import { BrowserRouter } from 'react-router-dom';
1010

packages/styleguide/app/components/Code.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sv from '@drawbotics/drylus-style-vars';
2-
import { css, cx } from 'emotion';
2+
import { css, cx } from '@emotion/css';
33
import Highlight, { defaultProps } from 'prism-react-renderer';
44
import React from 'react';
55

packages/styleguide/app/components/InlineCode.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sv from '@drawbotics/drylus-style-vars';
2-
import { css } from 'emotion';
2+
import { css } from '@emotion/css';
33
import React from 'react';
44

55
const styles = {

packages/styleguide/app/components/LinksNavigation.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sv, { fade } from '@drawbotics/drylus-style-vars';
22
import { Title } from '@drawbotics/react-drylus';
3-
import { css, cx } from 'emotion';
3+
import { css, cx } from '@emotion/css';
44
import kebabCase from 'lodash/kebabCase';
55
import last from 'lodash/last';
66
import omit from 'lodash/omit';

packages/styleguide/app/components/MobileSidebar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
Text,
1414
Title,
1515
} from '@drawbotics/react-drylus';
16-
import { css, keyframes } from 'emotion';
16+
import { css, keyframes } from '@emotion/css';
1717
import React, { useEffect, useState } from 'react';
1818
import { useLocation } from 'react-router';
1919
import { Link } from 'react-router-dom';

packages/styleguide/app/components/Playground/Playground.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sv from '@drawbotics/drylus-style-vars';
2-
import { css, cx } from 'emotion';
2+
import { css, cx } from '@emotion/css';
33
import flow from 'lodash/flow';
44
import omit from 'lodash/omit';
55
import React, { useRef, useState } from 'react';

packages/styleguide/app/components/Playground/Preview.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sv from '@drawbotics/drylus-style-vars';
22
import { Button, Icon, Size, Tier } from '@drawbotics/react-drylus';
3-
import { css, cx } from 'emotion';
3+
import { css, cx } from '@emotion/css';
44
import React, { Fragment, useState } from 'react';
55
import ReactDOM from 'react-dom';
66

packages/styleguide/app/components/Playground/Prop/Prop.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sv from '@drawbotics/drylus-style-vars';
2-
import { css } from 'emotion';
2+
import { css } from '@emotion/css';
33
import React from 'react';
44

55
import { extractIntrinsics } from '../utils';

packages/styleguide/app/components/Playground/Prop/props/ToggleProp.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Toggle } from '@drawbotics/react-drylus';
2-
import { css } from 'emotion';
2+
import { css } from '@emotion/css';
33
import React from 'react';
44

55
const styles = {

0 commit comments

Comments
 (0)