Skip to content

Commit 4ae5be5

Browse files
committed
Add fixtures for style objects
1 parent 103a84b commit 4ae5be5

File tree

3 files changed

+223
-0
lines changed

3 files changed

+223
-0
lines changed
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`style-objects.ts 1`] = `
4+
5+
File: style-objects.ts
6+
Source code:
7+
8+
declare const styled: any;
9+
10+
const Button = styled.button({
11+
color: 'red'
12+
});
13+
14+
declare const nonStyled: any;
15+
16+
const NonButton = nonStyled.button({
17+
color: 'red'
18+
});
19+
20+
const OtherButton = styled(Button)({
21+
color: 'blue'
22+
});
23+
24+
const SuperButton = Button.extend({
25+
color: 'super'
26+
});
27+
28+
export default styled.link({
29+
color: 'black'
30+
});
31+
32+
export const SmallButton = Button.extend({
33+
fontSize: '.7em'
34+
});
35+
36+
const MiniButton = styled(SmallButton).attrs({ size: 'mini' })({
37+
fontSize: '.1em'
38+
});
39+
40+
41+
TypeScript before transform:
42+
43+
declare const styled: any;
44+
const Button = styled.button({
45+
color: "red"
46+
});
47+
declare const nonStyled: any;
48+
const NonButton = nonStyled.button({
49+
color: "red"
50+
});
51+
const OtherButton = styled(Button)({
52+
color: "blue"
53+
});
54+
const SuperButton = Button.extend({
55+
color: "super"
56+
});
57+
export default styled.link({
58+
color: "black"
59+
});
60+
export const SmallButton = Button.extend({
61+
fontSize: ".7em"
62+
});
63+
const MiniButton = styled(SmallButton).attrs({ size: "mini" })({
64+
fontSize: ".1em"
65+
});
66+
67+
68+
TypeScript after transform:
69+
70+
declare const styled: any;
71+
const Button = styled.button({
72+
color: 'red'
73+
});
74+
declare const nonStyled: any;
75+
const NonButton = nonStyled.button({
76+
color: 'red'
77+
});
78+
const OtherButton = styled(Button)({
79+
color: 'blue'
80+
});
81+
const SuperButton = Button.extend({
82+
color: 'super'
83+
});
84+
export default styled.link({
85+
color: 'black'
86+
});
87+
export const SmallButton = Button.extend({
88+
fontSize: '.7em'
89+
});
90+
const MiniButton = styled(SmallButton).attrs({ size: 'mini' })({
91+
fontSize: '.1em'
92+
});
93+
94+
95+
96+
`;
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`style-objects.ts 1`] = `
4+
5+
File: style-objects.ts
6+
Source code:
7+
8+
declare const styled: any;
9+
10+
const Button = styled.button({
11+
color: 'red'
12+
});
13+
14+
declare const nonStyled: any;
15+
16+
const NonButton = nonStyled.button({
17+
color: 'red'
18+
});
19+
20+
const OtherButton = styled(Button)({
21+
color: 'blue'
22+
});
23+
24+
const SuperButton = Button.extend({
25+
color: 'super'
26+
});
27+
28+
export default styled.link({
29+
color: 'black'
30+
});
31+
32+
export const SmallButton = Button.extend({
33+
fontSize: '.7em'
34+
});
35+
36+
const MiniButton = styled(SmallButton).attrs({ size: 'mini' })({
37+
fontSize: '.1em'
38+
});
39+
40+
41+
TypeScript before transform:
42+
43+
declare const styled: any;
44+
const Button = styled.button({
45+
color: "red"
46+
});
47+
declare const nonStyled: any;
48+
const NonButton = nonStyled.button({
49+
color: "red"
50+
});
51+
const OtherButton = styled(Button)({
52+
color: "blue"
53+
});
54+
const SuperButton = Button.extend({
55+
color: "super"
56+
});
57+
export default styled.link({
58+
color: "black"
59+
});
60+
export const SmallButton = Button.extend({
61+
fontSize: ".7em"
62+
});
63+
const MiniButton = styled(SmallButton).attrs({ size: "mini" })({
64+
fontSize: ".1em"
65+
});
66+
67+
68+
TypeScript after transform:
69+
70+
declare const styled: any;
71+
const Button = styled.button({
72+
color: 'red'
73+
});
74+
declare const nonStyled: any;
75+
const NonButton = nonStyled.button({
76+
color: 'red'
77+
});
78+
const OtherButton = styled(Button)({
79+
color: 'blue'
80+
});
81+
const SuperButton = Button.extend({
82+
color: 'super'
83+
});
84+
export default styled.link({
85+
color: 'black'
86+
});
87+
export const SmallButton = Button.extend({
88+
fontSize: '.7em'
89+
});
90+
const MiniButton = styled(SmallButton).attrs({ size: 'mini' })({
91+
fontSize: '.1em'
92+
});
93+
94+
95+
96+
`;
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
declare const styled: any;
2+
3+
const Button = styled.button({
4+
color: 'red'
5+
});
6+
7+
declare const nonStyled: any;
8+
9+
const NonButton = nonStyled.button({
10+
color: 'red'
11+
});
12+
13+
const OtherButton = styled(Button)({
14+
color: 'blue'
15+
});
16+
17+
const SuperButton = Button.extend({
18+
color: 'super'
19+
});
20+
21+
export default styled.link({
22+
color: 'black'
23+
});
24+
25+
export const SmallButton = Button.extend({
26+
fontSize: '.7em'
27+
});
28+
29+
const MiniButton = styled(SmallButton).attrs({ size: 'mini' })({
30+
fontSize: '.1em'
31+
});

0 commit comments

Comments
 (0)