Skip to content

Commit 7559374

Browse files
committed
REFACTOR to use emotion, see: paypal/glamorous#419
1 parent 96f130f commit 7559374

File tree

70 files changed

+3311
-5761
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+3311
-5761
lines changed

.babelrc

+8-28
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,13 @@
11
{
22
"presets": ["env", "stage-0", "react"],
33
"env": {
4-
"development": {
5-
"plugins": [
6-
"babel-plugin-macros",
7-
"babel-plugin-glamorous-displayname",
8-
["transform-runtime", {
9-
"polyfill": false,
10-
"regenerator": true
11-
}]
12-
]
13-
},
14-
"test": {
15-
"plugins": [
16-
"babel-plugin-macros",
17-
["transform-runtime", {
18-
"polyfill": false,
19-
"regenerator": true
20-
}]
21-
]
22-
},
23-
"production": {
24-
"plugins": [
25-
"babel-plugin-macros",
26-
["transform-runtime", {
27-
"polyfill": false,
28-
"regenerator": true
29-
}]
30-
]
31-
}
4+
"plugins": [
5+
"emotion",
6+
"babel-plugin-macros",
7+
["transform-runtime", {
8+
"polyfill": false,
9+
"regenerator": true
10+
}]
11+
]
3212
}
3313
}

addons/a11y/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
"@storybook/core-events": "4.0.0-alpha.4",
3232
"axe-core": "^3.0.2",
3333
"babel-runtime": "^6.26.0",
34-
"glamor": "^2.20.40",
35-
"glamorous": "^4.13.0",
34+
"emotion": "^9.1.3",
35+
"react-emotion": "^9.1.3",
3636
"global": "^4.3.2",
3737
"prop-types": "^15.6.1"
3838
},

addons/a11y/src/components/Report/RerunButton.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import glamorous from 'glamorous';
1+
import styled from 'react-emotion';
22

3-
const RerunButton = glamorous.button({
3+
const RerunButton = styled('button')({
44
position: 'absolute',
55
bottom: 0,
66
right: 0,

addons/actions/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"@storybook/core-events": "4.0.0-alpha.4",
2626
"babel-runtime": "^6.26.0",
2727
"deep-equal": "^1.0.1",
28-
"glamor": "^2.20.40",
29-
"glamorous": "^4.13.0",
28+
"emotion": "^9.1.3",
29+
"react-emotion": "^9.1.3",
3030
"global": "^4.3.2",
3131
"lodash.isequal": "^4.5.0",
3232
"make-error": "^1.3.4",

addons/actions/src/components/ActionLogger/style.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import glamorous from 'glamorous';
1+
import styled from 'react-emotion';
22
import { Button as BaseButton } from '@storybook/components';
33

4-
export const Actions = glamorous.pre({
4+
export const Actions = styled('pre')({
55
flex: 1,
66
margin: 0,
77
padding: '8px 2px 20px 0',
88
overflowY: 'auto',
99
color: '#666',
1010
});
1111

12-
export const Action = glamorous.div({
12+
export const Action = styled('div')({
1313
display: 'flex',
1414
padding: '3px 3px 3px 0',
1515
borderLeft: '5px solid white',
@@ -18,7 +18,7 @@ export const Action = glamorous.div({
1818
alignItems: 'start',
1919
});
2020

21-
export const Button = glamorous(BaseButton)({
21+
export const Button = styled(BaseButton)({
2222
position: 'absolute',
2323
bottom: 0,
2424
right: 0,
@@ -30,24 +30,24 @@ export const Button = glamorous(BaseButton)({
3030
border: '0 none',
3131
});
3232

33-
export const Counter = glamorous.div({
33+
export const Counter = styled('div')({
3434
margin: '0 5px 0 5px',
3535
backgroundColor: '#777777',
3636
color: '#ffffff',
3737
padding: '1px 5px',
3838
borderRadius: '20px',
3939
});
4040

41-
export const Countwrap = glamorous.div({
41+
export const Countwrap = styled('div')({
4242
paddingBottom: 2,
4343
});
4444

45-
export const InspectorContainer = glamorous.div({
45+
export const InspectorContainer = styled('div')({
4646
flex: 1,
4747
padding: '0 0 0 5px',
4848
});
4949

50-
export const Wrapper = glamorous.div({
50+
export const Wrapper = styled('div')({
5151
flex: 1,
5252
display: 'flex',
5353
position: 'relative',

addons/info/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"@storybook/components": "4.0.0-alpha.4",
1818
"babel-runtime": "^6.26.0",
1919
"core-js": "2.5.6",
20-
"glamor": "^2.20.40",
21-
"glamorous": "^4.13.0",
20+
"emotion": "^9.1.3",
21+
"react-emotion": "^9.1.3",
2222
"global": "^4.3.2",
2323
"marksy": "^6.0.3",
2424
"nested-object-assign": "^1.0.1",

0 commit comments

Comments
 (0)