@comicrelief/component-library 7.38.0 → 7.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Atoms/Button/Button.js +9 -5
- package/dist/components/Atoms/Button/Button.test.js +2 -2
- package/dist/components/Atoms/Picture/Picture.js +49 -6
- package/dist/components/Atoms/Picture/Picture.test.js +2 -2
- package/dist/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +2 -2
- package/dist/components/Molecules/Card/Card.js +20 -28
- package/dist/components/Molecules/Card/Card.md +71 -3
- package/dist/components/Molecules/Card/Card.style.js +74 -0
- package/dist/components/Molecules/Card/Card.test.js +10 -0
- package/dist/components/Molecules/Card/__snapshots__/Card.test.js.snap +113 -7
- package/dist/components/Molecules/Chip/Chip.style.js +26 -22
- package/dist/components/Molecules/Chip/Chip.test.js +2 -2
- package/dist/components/Molecules/PartnerLink/PartnerLink.test.js +1 -1
- package/dist/components/Molecules/Promo/Promo.style.js +65 -20
- package/dist/components/Molecules/SearchInput/SearchInput.style.js +7 -3
- package/dist/components/Molecules/SingleMessage/SingleMessage.style.js +89 -59
- package/dist/components/Organisms/Donate/Donate.style.js +96 -42
- package/dist/components/Organisms/Donate/Form/PopUpComponent.js +11 -7
- package/dist/components/Organisms/Donate/GivingSelector/GivingSelector.style.js +17 -13
- package/dist/components/Organisms/Donate/MoneyBuy/MoneyBuy.js +17 -13
- package/dist/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +8 -6
- package/dist/components/Organisms/Header/Header.style.js +2 -2
- package/dist/components/Organisms/MarketingPreferencesDS/MarketingPreferencesDS.style.js +35 -26
- package/dist/components/Organisms/Membership/Membership.style.js +43 -24
- package/dist/index.js +7 -0
- package/dist/theme/shared/allContainers.js +12 -0
- package/package.json +1 -1
- package/src/components/Atoms/Button/Button.js +1 -2
- package/src/components/Atoms/Button/Button.test.js +12 -10
- package/src/components/Atoms/Picture/Picture.js +50 -5
- package/src/components/Atoms/Picture/Picture.test.js +12 -8
- package/src/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +7 -7
- package/src/components/Molecules/Card/Card.js +29 -28
- package/src/components/Molecules/Card/Card.md +71 -3
- package/src/components/Molecules/Card/Card.style.js +77 -0
- package/src/components/Molecules/Card/Card.test.js +17 -0
- package/src/components/Molecules/Card/__snapshots__/Card.test.js.snap +113 -7
- package/src/components/Molecules/Chip/Chip.style.js +1 -2
- package/src/components/Molecules/Chip/Chip.test.js +12 -10
- package/src/components/Molecules/PartnerLink/PartnerLink.test.js +12 -8
- package/src/components/Molecules/Promo/Promo.style.js +10 -10
- package/src/components/Molecules/SearchInput/SearchInput.style.js +1 -2
- package/src/components/Molecules/SingleMessage/SingleMessage.style.js +7 -7
- package/src/components/Organisms/Donate/Donate.style.js +11 -12
- package/src/components/Organisms/Donate/Form/PopUpComponent.js +1 -2
- package/src/components/Organisms/Donate/GivingSelector/GivingSelector.style.js +1 -2
- package/src/components/Organisms/Donate/MoneyBuy/MoneyBuy.js +1 -2
- package/src/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +8 -6
- package/src/components/Organisms/Header/Header.style.js +1 -1
- package/src/components/Organisms/MarketingPreferencesDS/MarketingPreferencesDS.style.js +2 -3
- package/src/components/Organisms/Membership/Membership.style.js +4 -5
- package/src/index.js +1 -0
- package/src/theme/shared/allContainers.js +7 -0
|
@@ -14,6 +14,23 @@ it('renders correctly', () => {
|
|
|
14
14
|
expect(tree).toMatchSnapshot();
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
+
it('renders correctly', () => {
|
|
18
|
+
const tree = renderWithTheme(
|
|
19
|
+
<Card
|
|
20
|
+
image={defaultData.image}
|
|
21
|
+
images={defaultData.image}
|
|
22
|
+
backgroundColor="yellow"
|
|
23
|
+
smallBreakpointLayout="Row"
|
|
24
|
+
mediumBreakpointLayout="Row"
|
|
25
|
+
>
|
|
26
|
+
<h2>Title</h2>
|
|
27
|
+
<p>Text body copy description. Loads more text test. Loads more text test.</p>
|
|
28
|
+
</Card>
|
|
29
|
+
).toJSON();
|
|
30
|
+
|
|
31
|
+
expect(tree).toMatchSnapshot();
|
|
32
|
+
});
|
|
33
|
+
|
|
17
34
|
it('renders correctly with no body', () => {
|
|
18
35
|
const tree = renderWithTheme(
|
|
19
36
|
<Card imageLow={defaultData.image} images={defaultData.image} backgroundColor="yellow" />
|
|
@@ -2,14 +2,75 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`renders correctly 1`] = `
|
|
4
4
|
.c0 {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: -webkit-box;
|
|
7
|
+
display: -webkit-flex;
|
|
8
|
+
display: -ms-flexbox;
|
|
9
|
+
display: flex;
|
|
10
|
+
height: 100%;
|
|
11
|
+
border-radius: 1rem;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
background: #FFE400;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.c1 {
|
|
5
17
|
display: -webkit-box;
|
|
6
18
|
display: -webkit-flex;
|
|
7
19
|
display: -ms-flexbox;
|
|
8
20
|
display: flex;
|
|
9
|
-
position: relative;
|
|
10
21
|
-webkit-flex-direction: column;
|
|
11
22
|
-ms-flex-direction: column;
|
|
12
23
|
flex-direction: column;
|
|
24
|
+
padding: 2rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@media (min-width:0px) {
|
|
28
|
+
.c0 {
|
|
29
|
+
-webkit-flex-direction: column;
|
|
30
|
+
-ms-flex-direction: column;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media (min-width:740px) {
|
|
36
|
+
.c0 {
|
|
37
|
+
-webkit-flex-direction: column;
|
|
38
|
+
-ms-flex-direction: column;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@media (min-width:1024px) {
|
|
44
|
+
.c0 {
|
|
45
|
+
-webkit-flex-direction: column;
|
|
46
|
+
-ms-flex-direction: column;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
<div
|
|
52
|
+
className="c0"
|
|
53
|
+
>
|
|
54
|
+
<div
|
|
55
|
+
className="c1"
|
|
56
|
+
>
|
|
57
|
+
<h2>
|
|
58
|
+
Title
|
|
59
|
+
</h2>
|
|
60
|
+
<p>
|
|
61
|
+
Description
|
|
62
|
+
</p>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
`;
|
|
66
|
+
|
|
67
|
+
exports[`renders correctly 2`] = `
|
|
68
|
+
.c0 {
|
|
69
|
+
position: relative;
|
|
70
|
+
display: -webkit-box;
|
|
71
|
+
display: -webkit-flex;
|
|
72
|
+
display: -ms-flexbox;
|
|
73
|
+
display: flex;
|
|
13
74
|
height: 100%;
|
|
14
75
|
border-radius: 1rem;
|
|
15
76
|
overflow: hidden;
|
|
@@ -17,7 +78,6 @@ exports[`renders correctly 1`] = `
|
|
|
17
78
|
}
|
|
18
79
|
|
|
19
80
|
.c1 {
|
|
20
|
-
padding: 2rem;
|
|
21
81
|
display: -webkit-box;
|
|
22
82
|
display: -webkit-flex;
|
|
23
83
|
display: -ms-flexbox;
|
|
@@ -25,6 +85,31 @@ exports[`renders correctly 1`] = `
|
|
|
25
85
|
-webkit-flex-direction: column;
|
|
26
86
|
-ms-flex-direction: column;
|
|
27
87
|
flex-direction: column;
|
|
88
|
+
padding: 2rem;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@media (min-width:0px) {
|
|
92
|
+
.c0 {
|
|
93
|
+
-webkit-flex-direction: column;
|
|
94
|
+
-ms-flex-direction: column;
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@media (min-width:740px) {
|
|
100
|
+
.c0 {
|
|
101
|
+
-webkit-flex-direction: column;
|
|
102
|
+
-ms-flex-direction: column;
|
|
103
|
+
flex-direction: column;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@media (min-width:1024px) {
|
|
108
|
+
.c0 {
|
|
109
|
+
-webkit-flex-direction: column;
|
|
110
|
+
-ms-flex-direction: column;
|
|
111
|
+
flex-direction: column;
|
|
112
|
+
}
|
|
28
113
|
}
|
|
29
114
|
|
|
30
115
|
<div
|
|
@@ -37,7 +122,7 @@ exports[`renders correctly 1`] = `
|
|
|
37
122
|
Title
|
|
38
123
|
</h2>
|
|
39
124
|
<p>
|
|
40
|
-
|
|
125
|
+
Text body copy description. Loads more text test. Loads more text test.
|
|
41
126
|
</p>
|
|
42
127
|
</div>
|
|
43
128
|
</div>
|
|
@@ -59,14 +144,11 @@ exports[`renders correctly with no body 1`] = `
|
|
|
59
144
|
}
|
|
60
145
|
|
|
61
146
|
.c0 {
|
|
147
|
+
position: relative;
|
|
62
148
|
display: -webkit-box;
|
|
63
149
|
display: -webkit-flex;
|
|
64
150
|
display: -ms-flexbox;
|
|
65
151
|
display: flex;
|
|
66
|
-
position: relative;
|
|
67
|
-
-webkit-flex-direction: column;
|
|
68
|
-
-ms-flex-direction: column;
|
|
69
|
-
flex-direction: column;
|
|
70
152
|
height: 100%;
|
|
71
153
|
border-radius: 1rem;
|
|
72
154
|
overflow: hidden;
|
|
@@ -77,6 +159,30 @@ exports[`renders correctly with no body 1`] = `
|
|
|
77
159
|
height: auto;
|
|
78
160
|
}
|
|
79
161
|
|
|
162
|
+
@media (min-width:0px) {
|
|
163
|
+
.c0 {
|
|
164
|
+
-webkit-flex-direction: column;
|
|
165
|
+
-ms-flex-direction: column;
|
|
166
|
+
flex-direction: column;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@media (min-width:740px) {
|
|
171
|
+
.c0 {
|
|
172
|
+
-webkit-flex-direction: column;
|
|
173
|
+
-ms-flex-direction: column;
|
|
174
|
+
flex-direction: column;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@media (min-width:1024px) {
|
|
179
|
+
.c0 {
|
|
180
|
+
-webkit-flex-direction: column;
|
|
181
|
+
-ms-flex-direction: column;
|
|
182
|
+
flex-direction: column;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
80
186
|
<div
|
|
81
187
|
className="c0"
|
|
82
188
|
>
|
|
@@ -2,7 +2,6 @@ import styled from 'styled-components';
|
|
|
2
2
|
|
|
3
3
|
import spacing from '../../../theme/shared/spacing';
|
|
4
4
|
import zIndex from '../../../theme/shared/zIndex';
|
|
5
|
-
import media from '../../../theme/shared/breakpoint';
|
|
6
5
|
import redShed from './assets/CR_RedShed.svg';
|
|
7
6
|
import howWeFund from './assets/CR_Funding.svg';
|
|
8
7
|
import mentalHealth from './assets/CR_MentalHealth.svg';
|
|
@@ -56,7 +55,7 @@ const CheckLabel = styled.label`
|
|
|
56
55
|
padding-right: 1rem;
|
|
57
56
|
flex: 0 0 auto;
|
|
58
57
|
position: relative;
|
|
59
|
-
${
|
|
58
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
60
59
|
margin: ${spacing('md')} ${spacing('md')} 0 0;
|
|
61
60
|
}
|
|
62
61
|
`;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import
|
|
3
|
-
import renderWithTheme from
|
|
4
|
-
import Chip from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "jest-styled-components";
|
|
3
|
+
import renderWithTheme from "../../../hoc/shallowWithTheme";
|
|
4
|
+
import Chip from "./Chip";
|
|
5
5
|
|
|
6
|
-
it(
|
|
7
|
-
const handleToggle = e => e.target.value;
|
|
6
|
+
it("renders article teaser correctly", () => {
|
|
7
|
+
const handleToggle = (e) => e.target.value;
|
|
8
8
|
const tree = renderWithTheme(
|
|
9
9
|
<Chip category="Gender Justice" handleToggle={handleToggle} />
|
|
10
10
|
).toJSON();
|
|
@@ -32,10 +32,6 @@ it('renders article teaser correctly', () => {
|
|
|
32
32
|
position: relative;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.c0 (min-width:740px) {
|
|
36
|
-
margin: 1rem 1rem 0 0;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
35
|
.c2 {
|
|
40
36
|
display: block;
|
|
41
37
|
position: absolute;
|
|
@@ -93,6 +89,12 @@ it('renders article teaser correctly', () => {
|
|
|
93
89
|
border-width: 3px;
|
|
94
90
|
}
|
|
95
91
|
|
|
92
|
+
@media (min-width:740px) {
|
|
93
|
+
.c0 {
|
|
94
|
+
margin: 1rem 1rem 0 0;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
96
98
|
<label
|
|
97
99
|
className="c0"
|
|
98
100
|
>
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "jest-styled-components";
|
|
3
3
|
|
|
4
|
-
import renderWithTheme from
|
|
5
|
-
import PartnerLink from
|
|
6
|
-
import Picture from
|
|
7
|
-
import { defaultData } from
|
|
8
|
-
it(
|
|
4
|
+
import renderWithTheme from "../../../hoc/shallowWithTheme";
|
|
5
|
+
import PartnerLink from "./PartnerLink";
|
|
6
|
+
import Picture from "../../Atoms/Picture/Picture";
|
|
7
|
+
import { defaultData } from "../../../styleguide/data/data";
|
|
8
|
+
it("renders correctly", () => {
|
|
9
9
|
const tree = renderWithTheme(
|
|
10
10
|
<PartnerLink link="https://www.comicrelief.com">
|
|
11
|
-
<Picture
|
|
11
|
+
<Picture
|
|
12
|
+
alt="test Image"
|
|
13
|
+
imageLow={defaultData.imageLow}
|
|
14
|
+
images={defaultData.images}
|
|
15
|
+
/>
|
|
12
16
|
</PartnerLink>
|
|
13
17
|
).toJSON();
|
|
14
18
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
|
-
import
|
|
2
|
+
import container from '../../../theme/shared/allContainers';
|
|
3
3
|
import spacing from '../../../theme/shared/spacing';
|
|
4
4
|
import zIndex from '../../../theme/shared/zIndex';
|
|
5
5
|
|
|
@@ -10,25 +10,25 @@ const Container = styled.div`
|
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
overflow: hidden;
|
|
12
12
|
background: ${({ theme, backgroundColor }) => theme.color(backgroundColor)};
|
|
13
|
-
${
|
|
13
|
+
@media ${({ theme }) => theme.allBreakpoints('L')} {
|
|
14
14
|
flex-direction: row;
|
|
15
15
|
}
|
|
16
16
|
${({ position }) => position === 'upper' && css`
|
|
17
17
|
clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
|
|
18
|
-
${
|
|
18
|
+
@media ${({ theme }) => theme.allBreakpoints('L')} {
|
|
19
19
|
clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
|
|
20
20
|
}
|
|
21
21
|
`}
|
|
22
22
|
${({ position }) => position === 'lower' && css`
|
|
23
23
|
clip-path: polygon(0 10%,100% 0,100% 100%,0 100%);
|
|
24
|
-
${
|
|
24
|
+
@media ${({ theme }) => theme.allBreakpoints('L')} {
|
|
25
25
|
clip-path: polygon(0 15%,100% 0,100% 100%,0 100%);
|
|
26
26
|
}
|
|
27
27
|
`}
|
|
28
28
|
${({ position }) => position === 'end' && css`
|
|
29
29
|
clip-path: polygon(0 0, 100% 0, 100% 90%, 0 101%);
|
|
30
30
|
border-radius: 0 0 0 2rem;
|
|
31
|
-
${
|
|
31
|
+
@media ${({ theme }) => theme.allBreakpoints('L')} {
|
|
32
32
|
clip-path: polygon(0 0,100% 0,100% 85%,0% 101%);
|
|
33
33
|
border-radius: 0 0 0 4rem;
|
|
34
34
|
}
|
|
@@ -47,7 +47,7 @@ const Wrapper = styled.div`
|
|
|
47
47
|
position: relative;
|
|
48
48
|
|
|
49
49
|
${({ copyLeft }) => !copyLeft && 'justify-content: flex-end'};
|
|
50
|
-
${
|
|
50
|
+
@media ${({ theme }) => theme.allBreakpoints('L')} {
|
|
51
51
|
min-height: calc(100vh - 90px);
|
|
52
52
|
}
|
|
53
53
|
`;
|
|
@@ -57,14 +57,14 @@ const Copy = styled.div`
|
|
|
57
57
|
padding: ${spacing('m')} ${spacing('m')} ${spacing('xl')};
|
|
58
58
|
${zIndex('low')};
|
|
59
59
|
|
|
60
|
-
${
|
|
60
|
+
@media ${({ theme }) => theme.allBreakpoints('L')} {
|
|
61
61
|
width: 100%;
|
|
62
62
|
padding: ${spacing('xxl')} ${spacing('m')};
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
${({ position }) => position === 'lower' && css`
|
|
66
66
|
padding: ${spacing('xl')} ${spacing('m')};
|
|
67
|
-
${
|
|
67
|
+
@media ${({ theme }) => theme.allBreakpoints('L')} {
|
|
68
68
|
padding: 6rem ${spacing('m')};
|
|
69
69
|
margin-top: 6rem;
|
|
70
70
|
}
|
|
@@ -77,7 +77,7 @@ const Media = styled.div`
|
|
|
77
77
|
img {
|
|
78
78
|
object-position: center;
|
|
79
79
|
}
|
|
80
|
-
${
|
|
80
|
+
@media ${({ theme }) => theme.allBreakpoints('L')} {
|
|
81
81
|
height: 100%;
|
|
82
82
|
position: absolute;
|
|
83
83
|
}
|
|
@@ -97,7 +97,7 @@ const Gradient = styled.div`
|
|
|
97
97
|
display: flex;
|
|
98
98
|
align-items: center;
|
|
99
99
|
|
|
100
|
-
${
|
|
100
|
+
@media ${({ theme }) => theme.allBreakpoints('L')} {
|
|
101
101
|
width: 50%;
|
|
102
102
|
position: absolute;
|
|
103
103
|
top: 0;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
|
|
3
3
|
import Input from '../../Atoms/Input/Input';
|
|
4
|
-
import { media } from '../../../theme/shared/size';
|
|
5
4
|
import spacing from '../../../theme/shared/spacing';
|
|
6
5
|
|
|
7
6
|
const Wrapper = styled.div`
|
|
@@ -39,7 +38,7 @@ const SearchField = styled(Input)`
|
|
|
39
38
|
:focus {
|
|
40
39
|
border: 0;
|
|
41
40
|
}
|
|
42
|
-
${
|
|
41
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
43
42
|
height: 100px;
|
|
44
43
|
font-size: ${({ theme }) => theme.fontSize('xxl')};
|
|
45
44
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
import spacing from '../../../theme/shared/spacing';
|
|
3
|
-
import
|
|
3
|
+
import container from '../../../theme/shared/allContainers';
|
|
4
4
|
import zIndex from '../../../theme/shared/zIndex';
|
|
5
5
|
import playIcon from './assets/video--play-icon.svg';
|
|
6
6
|
import playIconHover from './assets/video--play-icon__hover.svg';
|
|
@@ -13,7 +13,7 @@ const Container = styled.div`
|
|
|
13
13
|
flex-direction: column;
|
|
14
14
|
overflow: hidden;
|
|
15
15
|
background: ${({ theme, backgroundColor }) => theme.color(backgroundColor)};
|
|
16
|
-
${
|
|
16
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
17
17
|
flex-direction: ${({ copyFirst }) => (copyFirst === true ? 'row-reverse' : 'row')};
|
|
18
18
|
${({ landscapeVideo, hasVideo, fullImage }) => (landscapeVideo && hasVideo && !fullImage ? 'min-height: 0;' : null)};
|
|
19
19
|
}
|
|
@@ -33,7 +33,7 @@ const Copy = styled.div`
|
|
|
33
33
|
${({ hasVideo, fullImage }) => (hasVideo === true && fullImage === true ? 'display: none;' : null)};
|
|
34
34
|
padding: ${spacing('l')};
|
|
35
35
|
|
|
36
|
-
${
|
|
36
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
37
37
|
${({ vhFull, fullImage }) => (vhFull || fullImage
|
|
38
38
|
? 'min-height: calc(100vh - 5.625rem); flex-direction: column; justify-content: center;'
|
|
39
39
|
: 'height: auto;')};
|
|
@@ -49,7 +49,7 @@ const Copy = styled.div`
|
|
|
49
49
|
|
|
50
50
|
${props => props.fullImage
|
|
51
51
|
&& css`
|
|
52
|
-
${
|
|
52
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
53
53
|
position: absolute;
|
|
54
54
|
width: 100%;
|
|
55
55
|
right: 0;
|
|
@@ -75,7 +75,7 @@ const Copy = styled.div`
|
|
|
75
75
|
padding: ${spacing('md')};
|
|
76
76
|
`)};
|
|
77
77
|
|
|
78
|
-
${
|
|
78
|
+
@media ${({ theme }) => theme.allBreakpoints('L')} {
|
|
79
79
|
${({ paddingOption }) => handlePadding(paddingOption)};
|
|
80
80
|
}
|
|
81
81
|
`;
|
|
@@ -94,7 +94,7 @@ const Media = styled.div`
|
|
|
94
94
|
${({ hasVideo }) => (hasVideo
|
|
95
95
|
? 'height: auto; overflow: hidden; padding-bottom: 56.25%;'
|
|
96
96
|
: null)};
|
|
97
|
-
${
|
|
97
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
98
98
|
padding-bottom: ${({ landscapeVideo, hasVideo }) => (landscapeVideo && hasVideo ? 'calc(56.25% / 2);' : '0;')};
|
|
99
99
|
}
|
|
100
100
|
`;
|
|
@@ -123,7 +123,7 @@ const PlayButton = styled.button`
|
|
|
123
123
|
background-image: ${({ isBuffering }) => (isBuffering === true ? `url(${loadingIcon})` : `url(${playIconHover})`)};
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
${
|
|
126
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
127
127
|
background-size: 100px;
|
|
128
128
|
}
|
|
129
129
|
`;
|
|
@@ -3,7 +3,6 @@ import styled, { css } from 'styled-components';
|
|
|
3
3
|
import Input from '../../Atoms/Input/Input';
|
|
4
4
|
import Text from '../../Atoms/Text/Text';
|
|
5
5
|
import spacing from '../../../theme/shared/spacing';
|
|
6
|
-
import { media } from '../../../theme/shared/size';
|
|
7
6
|
import Picture from '../../Atoms/Picture/Picture';
|
|
8
7
|
import zIndex from '../../../theme/shared/zIndex';
|
|
9
8
|
import handlePadding from '../../../utils/_utils';
|
|
@@ -15,7 +14,7 @@ const Container = styled.div`
|
|
|
15
14
|
justify-content: center;
|
|
16
15
|
height: auto;
|
|
17
16
|
background-color: ${({ theme, mobileBackgroundColor }) => theme.color(mobileBackgroundColor)};
|
|
18
|
-
${
|
|
17
|
+
@media ${({ theme }) => theme.allBreakpoints('L')} {
|
|
19
18
|
flex-direction: row;
|
|
20
19
|
align-items: center;
|
|
21
20
|
justify-content: inherit;
|
|
@@ -56,11 +55,11 @@ const Wrapper = styled.div`
|
|
|
56
55
|
justify-content: center;
|
|
57
56
|
`};
|
|
58
57
|
|
|
59
|
-
${
|
|
58
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
60
59
|
padding: ${spacing('xl')} ${spacing('md')};
|
|
61
60
|
}
|
|
62
61
|
|
|
63
|
-
${
|
|
62
|
+
@media ${({ theme }) => theme.allBreakpoints('L')} {
|
|
64
63
|
display: flex;
|
|
65
64
|
padding: ${spacing('xl')} 0;
|
|
66
65
|
${({ paddingOption }) => handlePadding(paddingOption)};
|
|
@@ -71,7 +70,7 @@ const TitleWrapperOuter = styled.div`
|
|
|
71
70
|
width: 100%;
|
|
72
71
|
display: flex;
|
|
73
72
|
font-family: ${({ theme }) => theme.fontFamilies(theme.font.regular)};
|
|
74
|
-
${
|
|
73
|
+
@media ${({ theme }) => theme.allBreakpoints('L')} {
|
|
75
74
|
width: 50%;
|
|
76
75
|
padding: ${spacing('xl')};
|
|
77
76
|
align-items: center;
|
|
@@ -86,7 +85,7 @@ const TitleWrapperInner = styled.div`
|
|
|
86
85
|
const FormWrapper = styled.div`
|
|
87
86
|
position: relative;
|
|
88
87
|
font-family: ${({ theme }) => theme.fontFamilies(theme.font.regular)};
|
|
89
|
-
${
|
|
88
|
+
@media ${({ theme }) => theme.allBreakpoints('L')} {
|
|
90
89
|
width: 50%;
|
|
91
90
|
}
|
|
92
91
|
`;
|
|
@@ -118,7 +117,7 @@ const Form = styled.form`
|
|
|
118
117
|
margin: ${spacing('l')} 0;
|
|
119
118
|
}
|
|
120
119
|
|
|
121
|
-
${
|
|
120
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
122
121
|
width: 450px;
|
|
123
122
|
margin-right: auto;
|
|
124
123
|
margin-left: auto;
|
|
@@ -129,7 +128,7 @@ const OuterFieldset = styled.fieldset`
|
|
|
129
128
|
padding: 0 ${spacing('md')} ${spacing('md')};
|
|
130
129
|
margin: 0;
|
|
131
130
|
border: none;
|
|
132
|
-
${
|
|
131
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
133
132
|
padding: 0 ${spacing('l')} ${spacing('l')};
|
|
134
133
|
}
|
|
135
134
|
|
|
@@ -150,13 +149,13 @@ const MoneyBuys = styled.div`
|
|
|
150
149
|
justify-content: space-between;
|
|
151
150
|
flex-direction: column;
|
|
152
151
|
margin-bottom: ${spacing('l')};
|
|
153
|
-
${
|
|
152
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
154
153
|
flex-direction: row;
|
|
155
154
|
}
|
|
156
155
|
label {
|
|
157
156
|
flex: 0 0 30%;
|
|
158
157
|
margin-bottom: ${spacing('sm')};
|
|
159
|
-
${
|
|
158
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
160
159
|
margin-bottom: 0;
|
|
161
160
|
}
|
|
162
161
|
input {
|
|
@@ -184,7 +183,7 @@ const AmountField = styled(Input)`
|
|
|
184
183
|
font-weight: 400;
|
|
185
184
|
display: block;
|
|
186
185
|
|
|
187
|
-
${
|
|
186
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
188
187
|
flex-basis: 60%;
|
|
189
188
|
}
|
|
190
189
|
|
|
@@ -238,7 +237,7 @@ const Button = styled.button`
|
|
|
238
237
|
background-color: ${({ theme }) => theme.color('coral_dark')};
|
|
239
238
|
}
|
|
240
239
|
|
|
241
|
-
${
|
|
240
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
242
241
|
padding: ${spacing('md')} ${spacing('l')};
|
|
243
242
|
}
|
|
244
243
|
`;
|
|
@@ -2,7 +2,6 @@ import React, { useState } from 'react';
|
|
|
2
2
|
import styled, { css, keyframes } from 'styled-components';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import Text from '../../../Atoms/Text/Text';
|
|
5
|
-
import { media } from '../../../../theme/shared/size';
|
|
6
5
|
import CloseCross from '../assets/close.svg';
|
|
7
6
|
|
|
8
7
|
const closeDuration = 0.6;
|
|
@@ -46,7 +45,7 @@ const StyledPopUp = styled.div`
|
|
|
46
45
|
box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.15);
|
|
47
46
|
border-radius: 10px;
|
|
48
47
|
|
|
49
|
-
${
|
|
48
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
50
49
|
width: 450px;
|
|
51
50
|
margin-right: auto;
|
|
52
51
|
margin-left: auto;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
|
|
3
|
-
import { media } from '../../../../theme/shared/size';
|
|
4
3
|
import spacing from '../../../../theme/shared/spacing';
|
|
5
4
|
import zIndex from '../../../../theme/shared/zIndex';
|
|
6
5
|
import hideVisually from '../../../../theme/shared/hideVisually';
|
|
@@ -32,7 +31,7 @@ const MoneyBox = styled.div`
|
|
|
32
31
|
margin: ${spacing('md')} 0;
|
|
33
32
|
border-radius: 2rem;
|
|
34
33
|
background: ${({ theme }) => theme.color('blue_light')};
|
|
35
|
-
${
|
|
34
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
36
35
|
width: 450px;
|
|
37
36
|
margin: 0 auto;
|
|
38
37
|
}
|
|
@@ -4,7 +4,6 @@ import styled, { css } from 'styled-components';
|
|
|
4
4
|
|
|
5
5
|
import Input from '../../../Atoms/Input/Input';
|
|
6
6
|
import spacing from '../../../../theme/shared/spacing';
|
|
7
|
-
import { media } from '../../../../theme/shared/size';
|
|
8
7
|
|
|
9
8
|
const MoneyBuyButton = styled(Input)`
|
|
10
9
|
display: block;
|
|
@@ -19,7 +18,7 @@ const MoneyBuyButton = styled(Input)`
|
|
|
19
18
|
padding: ${spacing('s')};
|
|
20
19
|
box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.15);
|
|
21
20
|
height: auto;
|
|
22
|
-
${
|
|
21
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
23
22
|
font-size: ${({ theme }) => theme.fontSize('xl')};
|
|
24
23
|
padding: ${spacing('m')};
|
|
25
24
|
}
|
|
@@ -70,12 +70,6 @@ exports[`renders correctly 1`] = `
|
|
|
70
70
|
color: #FFFFFF;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
.c15 (min-width:1024px) {
|
|
74
|
-
width: auto;
|
|
75
|
-
padding: 1rem 2rem;
|
|
76
|
-
margin: 0 auto 2rem;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
73
|
.c8 {
|
|
80
74
|
position: relative;
|
|
81
75
|
display: -webkit-box;
|
|
@@ -223,6 +217,14 @@ exports[`renders correctly 1`] = `
|
|
|
223
217
|
}
|
|
224
218
|
}
|
|
225
219
|
|
|
220
|
+
@media (min-width:1024px) {
|
|
221
|
+
.c15 {
|
|
222
|
+
width: auto;
|
|
223
|
+
padding: 1rem 2rem;
|
|
224
|
+
margin: 0 auto 2rem;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
226
228
|
@media (min-width:740px) {
|
|
227
229
|
.c13 {
|
|
228
230
|
max-width: 290px;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
|
|
3
3
|
import zIndex from '../../../theme/shared/zIndex';
|
|
4
|
-
import
|
|
4
|
+
import container from '../../../theme/shared/allContainers';
|
|
5
5
|
import spacing from '../../../theme/shared/spacing';
|
|
6
6
|
|
|
7
7
|
const HeaderWrapper = styled.header.attrs(() => ({
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
|
|
3
3
|
import spacing from '../../../theme/shared/spacing';
|
|
4
|
-
import { media } from '../../../theme/shared/size';
|
|
5
4
|
import checkBoxIcon from './assets/CR_Tick_black.svg';
|
|
6
5
|
import TextInput from './_TextInput';
|
|
7
6
|
|
|
@@ -9,7 +8,7 @@ const OuterWrapper = styled.div`
|
|
|
9
8
|
display: flex;
|
|
10
9
|
flex-direction: column;
|
|
11
10
|
|
|
12
|
-
${
|
|
11
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
13
12
|
flex-direction: row;
|
|
14
13
|
flex-wrap: wrap;
|
|
15
14
|
}
|
|
@@ -166,7 +165,7 @@ const ExtraInfo = styled.span`
|
|
|
166
165
|
const MPTextInput = styled(TextInput)`
|
|
167
166
|
input {
|
|
168
167
|
border: 1px solid ${({ theme }) => theme.color('black')};;
|
|
169
|
-
${
|
|
168
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
170
169
|
max-width: none;
|
|
171
170
|
}
|
|
172
171
|
}
|