@comicrelief/component-library 8.29.0 → 8.31.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/ErrorText/ErrorText.js +2 -1
- package/dist/components/Atoms/ErrorText/ErrorText.md +1 -1
- package/dist/components/Atoms/ErrorText/__snapshots__/ErrorText.test.js.snap +3 -1
- package/dist/components/Atoms/Input/Input.js +1 -1
- package/dist/components/Atoms/Input/Input.md +12 -0
- package/dist/components/Atoms/Label/Label.js +21 -9
- package/dist/components/Atoms/Select/Select.js +1 -1
- package/dist/components/Atoms/TextArea/TextArea.js +1 -1
- package/dist/components/Molecules/InfoBanner/InfoBanner.js +6 -6
- package/dist/components/Molecules/InfoBanner/__snapshots__/InfoBanner.test.js.snap +8 -6
- package/dist/components/Organisms/EmailSignUp/_EmailSignUp.js +3 -1
- package/dist/components/Organisms/ImpactSlider/_ImpactMoneybuys.js +1 -1
- package/dist/theme/crTheme/fontSizes.js +4 -1
- package/package.json +1 -1
- package/src/components/Atoms/ErrorText/ErrorText.js +1 -1
- package/src/components/Atoms/ErrorText/ErrorText.md +1 -1
- package/src/components/Atoms/ErrorText/__snapshots__/ErrorText.test.js.snap +3 -1
- package/src/components/Atoms/Input/Input.js +1 -1
- package/src/components/Atoms/Input/Input.md +12 -0
- package/src/components/Atoms/Label/Label.js +18 -3
- package/src/components/Atoms/Select/Select.js +1 -1
- package/src/components/Atoms/TextArea/TextArea.js +1 -1
- package/src/components/Molecules/InfoBanner/InfoBanner.js +6 -6
- package/src/components/Molecules/InfoBanner/__snapshots__/InfoBanner.test.js.snap +8 -6
- package/src/components/Organisms/EmailSignUp/_EmailSignUp.js +1 -1
- package/src/components/Organisms/ImpactSlider/_ImpactMoneybuys.js +1 -1
- package/src/theme/crTheme/fontSizes.js +4 -1
|
@@ -18,7 +18,8 @@ const ErrorText = _ref => {
|
|
|
18
18
|
...rest
|
|
19
19
|
} = _ref;
|
|
20
20
|
return /*#__PURE__*/_react.default.createElement(_Text.default, Object.assign({}, rest, {
|
|
21
|
-
color: "red"
|
|
21
|
+
color: "red",
|
|
22
|
+
size: "error"
|
|
22
23
|
}), /*#__PURE__*/_react.default.createElement(ErrorIcon, null, children));
|
|
23
24
|
};
|
|
24
25
|
var _default = exports.default = ErrorText;
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
exports[`renders correctly 1`] = `
|
|
4
4
|
.c0 {
|
|
5
5
|
color: #E52630;
|
|
6
|
+
font-size: 0.875rem;
|
|
7
|
+
line-height: 0.875rem;
|
|
6
8
|
text-transform: inherit;
|
|
7
9
|
line-height: normal;
|
|
8
10
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
@@ -19,7 +21,7 @@ exports[`renders correctly 1`] = `
|
|
|
19
21
|
<span
|
|
20
22
|
className="c0"
|
|
21
23
|
color="red"
|
|
22
|
-
size="
|
|
24
|
+
size="error"
|
|
23
25
|
>
|
|
24
26
|
<span
|
|
25
27
|
className="c1"
|
|
@@ -112,7 +112,7 @@ const Input = /*#__PURE__*/_react.default.forwardRef((_ref7, ref) => {
|
|
|
112
112
|
prefixLength: prefix.length,
|
|
113
113
|
required: optional === false
|
|
114
114
|
}, rest)), errorMsg && /*#__PURE__*/_react.default.createElement(ErrorIconWrapper, null))), errorMsg && /*#__PURE__*/_react.default.createElement(_ErrorText.default, {
|
|
115
|
-
size: "
|
|
115
|
+
size: "error",
|
|
116
116
|
weight: "bold",
|
|
117
117
|
"data-test": "error-message"
|
|
118
118
|
}, errorMsg));
|
|
@@ -119,3 +119,15 @@ const ItalicText = styled(Text).attrs({weight: 'normal'})`
|
|
|
119
119
|
maxPxWidthLargeBreakpoint={250}
|
|
120
120
|
/>
|
|
121
121
|
```
|
|
122
|
+
|
|
123
|
+
```js
|
|
124
|
+
<h4>Input with dark label</h4>
|
|
125
|
+
<Input
|
|
126
|
+
name="dark-label"
|
|
127
|
+
placeholder="£0.00"
|
|
128
|
+
type="text"
|
|
129
|
+
label="The label text can be made black rather than the default grey"
|
|
130
|
+
id="input-example-8"
|
|
131
|
+
labelProps={{ darkLabel: true }}
|
|
132
|
+
/>
|
|
133
|
+
```
|
|
@@ -11,16 +11,24 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
11
11
|
var _Text = _interopRequireDefault(require("../Text/Text"));
|
|
12
12
|
var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
|
|
13
13
|
var _hideVisually = _interopRequireDefault(require("../../../theme/shared/hideVisually"));
|
|
14
|
-
const
|
|
15
|
-
displayName: "Label__LabelElement",
|
|
16
|
-
componentId: "sc-2nrw50-0"
|
|
17
|
-
})(["width:100%;position:relative;display:flex;flex-direction:column;color:", ";", ""], _ref => {
|
|
14
|
+
const getLabelColor = _ref => {
|
|
18
15
|
let {
|
|
19
16
|
theme,
|
|
20
|
-
errorMsg
|
|
17
|
+
errorMsg,
|
|
18
|
+
darkLabel
|
|
21
19
|
} = _ref;
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
if (errorMsg) {
|
|
21
|
+
return theme.color('red');
|
|
22
|
+
}
|
|
23
|
+
if (darkLabel) {
|
|
24
|
+
return theme.color('black');
|
|
25
|
+
}
|
|
26
|
+
return theme.color('grey_label');
|
|
27
|
+
};
|
|
28
|
+
const LabelElement = _styledComponents.default.label.withConfig({
|
|
29
|
+
displayName: "Label__LabelElement",
|
|
30
|
+
componentId: "sc-2nrw50-0"
|
|
31
|
+
})(["width:100%;position:relative;display:flex;flex-direction:column;color:", ";", ""], getLabelColor, _ref2 => {
|
|
24
32
|
let {
|
|
25
33
|
optional,
|
|
26
34
|
theme
|
|
@@ -63,6 +71,7 @@ const LabelText = _ref3 => {
|
|
|
63
71
|
* @param children
|
|
64
72
|
* @param label
|
|
65
73
|
* @param hideLabel - Visually hide the label text (without removing it from the document)
|
|
74
|
+
* @param darkLabel - Make the label text black rather than the default grey
|
|
66
75
|
* @param rest
|
|
67
76
|
* @returns {JSX.Element}
|
|
68
77
|
* @constructor
|
|
@@ -72,13 +81,15 @@ const Label = _ref4 => {
|
|
|
72
81
|
children = null,
|
|
73
82
|
label,
|
|
74
83
|
hideLabel = false,
|
|
84
|
+
darkLabel = false,
|
|
75
85
|
optional = null,
|
|
76
86
|
errorMsg = '',
|
|
77
87
|
...rest
|
|
78
88
|
} = _ref4;
|
|
79
89
|
return /*#__PURE__*/_react.default.createElement(LabelElement, Object.assign({
|
|
80
90
|
optional: optional,
|
|
81
|
-
errorMsg: errorMsg
|
|
91
|
+
errorMsg: errorMsg,
|
|
92
|
+
darkLabel: darkLabel
|
|
82
93
|
}, rest), /*#__PURE__*/_react.default.createElement(LabelText, {
|
|
83
94
|
label: label,
|
|
84
95
|
hideLabel: hideLabel
|
|
@@ -86,6 +97,7 @@ const Label = _ref4 => {
|
|
|
86
97
|
};
|
|
87
98
|
LabelElement.propTypes = {
|
|
88
99
|
optional: _propTypes.default.bool,
|
|
89
|
-
errorMsg: _propTypes.default.string
|
|
100
|
+
errorMsg: _propTypes.default.string,
|
|
101
|
+
darkLabel: _propTypes.default.bool
|
|
90
102
|
};
|
|
91
103
|
var _default = exports.default = Label;
|
|
@@ -96,7 +96,7 @@ const Select = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
|
|
|
96
96
|
key: option.value,
|
|
97
97
|
value: option.value
|
|
98
98
|
}, option.displayValue))), errorMsg && /*#__PURE__*/_react.default.createElement(_ErrorText.default, {
|
|
99
|
-
size: "
|
|
99
|
+
size: "error",
|
|
100
100
|
weight: "bold",
|
|
101
101
|
"data-test": "error-message"
|
|
102
102
|
}, errorMsg));
|
|
@@ -46,7 +46,7 @@ const TextArea = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
|
|
|
46
46
|
"aria-describedby": id,
|
|
47
47
|
ref: ref
|
|
48
48
|
})), errorMsg && /*#__PURE__*/_react.default.createElement(_ErrorText.default, {
|
|
49
|
-
size: "
|
|
49
|
+
size: "error",
|
|
50
50
|
weight: "bold",
|
|
51
51
|
"data-test": "error-message"
|
|
52
52
|
}, errorMsg));
|
|
@@ -50,21 +50,21 @@ const InfoBanner = _ref3 => {
|
|
|
50
50
|
uppercase: true
|
|
51
51
|
}, "Project Name"), /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
52
52
|
tag: "p",
|
|
53
|
-
size: "
|
|
53
|
+
size: "s"
|
|
54
54
|
}, title)), /*#__PURE__*/_react.default.createElement(Info, null, /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
55
55
|
tag: "h3",
|
|
56
56
|
size: "md",
|
|
57
57
|
uppercase: true
|
|
58
58
|
}, "End Date"), /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
59
59
|
tag: "p",
|
|
60
|
-
size: "
|
|
60
|
+
size: "s"
|
|
61
61
|
}, endDate)), /*#__PURE__*/_react.default.createElement(Info, null, /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
62
62
|
tag: "h3",
|
|
63
63
|
size: "md",
|
|
64
64
|
uppercase: true
|
|
65
65
|
}, "Funding theme"), /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
66
66
|
tag: "p",
|
|
67
|
-
size: "
|
|
67
|
+
size: "s"
|
|
68
68
|
}, /*#__PURE__*/_react.default.createElement(_Link.default, {
|
|
69
69
|
href: themeLink,
|
|
70
70
|
target: "self",
|
|
@@ -75,7 +75,7 @@ const InfoBanner = _ref3 => {
|
|
|
75
75
|
uppercase: true
|
|
76
76
|
}, "Amount Awarded"), /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
77
77
|
tag: "p",
|
|
78
|
-
size: "
|
|
78
|
+
size: "s"
|
|
79
79
|
}, /*#__PURE__*/_react.default.createElement(_reactCurrencyFormat.default, {
|
|
80
80
|
value: amount,
|
|
81
81
|
displayType: "text",
|
|
@@ -88,14 +88,14 @@ const InfoBanner = _ref3 => {
|
|
|
88
88
|
uppercase: true
|
|
89
89
|
}, "Start Date"), /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
90
90
|
tag: "p",
|
|
91
|
-
size: "
|
|
91
|
+
size: "s"
|
|
92
92
|
}, startDate)), /*#__PURE__*/_react.default.createElement(Info, null, /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
93
93
|
tag: "h3",
|
|
94
94
|
size: "md",
|
|
95
95
|
uppercase: true
|
|
96
96
|
}, "Beneficiary Country"), /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
97
97
|
tag: "p",
|
|
98
|
-
size: "
|
|
98
|
+
size: "s"
|
|
99
99
|
}, country)));
|
|
100
100
|
};
|
|
101
101
|
var _default = exports.default = InfoBanner;
|
|
@@ -7,6 +7,8 @@ exports[`renders correctly 1`] = `
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.c3 {
|
|
10
|
+
font-size: 1rem;
|
|
11
|
+
line-height: 1rem;
|
|
10
12
|
text-transform: inherit;
|
|
11
13
|
line-height: normal;
|
|
12
14
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
@@ -88,7 +90,7 @@ exports[`renders correctly 1`] = `
|
|
|
88
90
|
<p
|
|
89
91
|
className="c3"
|
|
90
92
|
color="inherit"
|
|
91
|
-
size="
|
|
93
|
+
size="s"
|
|
92
94
|
>
|
|
93
95
|
Hello There
|
|
94
96
|
</p>
|
|
@@ -106,7 +108,7 @@ exports[`renders correctly 1`] = `
|
|
|
106
108
|
<p
|
|
107
109
|
className="c3"
|
|
108
110
|
color="inherit"
|
|
109
|
-
size="
|
|
111
|
+
size="s"
|
|
110
112
|
>
|
|
111
113
|
1st June 2020
|
|
112
114
|
</p>
|
|
@@ -124,7 +126,7 @@ exports[`renders correctly 1`] = `
|
|
|
124
126
|
<p
|
|
125
127
|
className="c3"
|
|
126
128
|
color="inherit"
|
|
127
|
-
size="
|
|
129
|
+
size="s"
|
|
128
130
|
>
|
|
129
131
|
<a
|
|
130
132
|
className="c4"
|
|
@@ -150,7 +152,7 @@ exports[`renders correctly 1`] = `
|
|
|
150
152
|
<p
|
|
151
153
|
className="c3"
|
|
152
154
|
color="inherit"
|
|
153
|
-
size="
|
|
155
|
+
size="s"
|
|
154
156
|
>
|
|
155
157
|
£2,000,000
|
|
156
158
|
</p>
|
|
@@ -168,7 +170,7 @@ exports[`renders correctly 1`] = `
|
|
|
168
170
|
<p
|
|
169
171
|
className="c3"
|
|
170
172
|
color="inherit"
|
|
171
|
-
size="
|
|
173
|
+
size="s"
|
|
172
174
|
>
|
|
173
175
|
1st June 2010
|
|
174
176
|
</p>
|
|
@@ -186,7 +188,7 @@ exports[`renders correctly 1`] = `
|
|
|
186
188
|
<p
|
|
187
189
|
className="c3"
|
|
188
190
|
color="inherit"
|
|
189
|
-
size="
|
|
191
|
+
size="s"
|
|
190
192
|
>
|
|
191
193
|
Uk
|
|
192
194
|
</p>
|
|
@@ -95,7 +95,9 @@ const EmailSignUp = _ref => {
|
|
|
95
95
|
loading: isSubmitting,
|
|
96
96
|
loadingText: "Submitting...",
|
|
97
97
|
"data-test": "subscribe-button"
|
|
98
|
-
}, /*#__PURE__*/_react.default.createElement(_Text.default, null, normalisedButtonText)))), isSubmitted && !isSubmitSuccessful && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, errors.formError !== undefined && /*#__PURE__*/_react.default.createElement(_ErrorText.default,
|
|
98
|
+
}, /*#__PURE__*/_react.default.createElement(_Text.default, null, normalisedButtonText)))), isSubmitted && !isSubmitSuccessful && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, errors.formError !== undefined && /*#__PURE__*/_react.default.createElement(_ErrorText.default, {
|
|
99
|
+
size: "error"
|
|
100
|
+
}, errors.formError.message)), /*#__PURE__*/_react.default.createElement(_EmailSignUp.PrivacyCopyWrapper, {
|
|
99
101
|
textColour: textColour
|
|
100
102
|
}, /*#__PURE__*/_react.default.createElement(_Text.default, null, privacyCopy)));
|
|
101
103
|
};
|
|
@@ -32,7 +32,7 @@ const Moneybuys = _ref => {
|
|
|
32
32
|
"data-testid": "moneybuy-amount"
|
|
33
33
|
}, thisAmount), /*#__PURE__*/_react.default.createElement(_ImpactMoneybuys.MoneybuyDescription, {
|
|
34
34
|
tag: "p",
|
|
35
|
-
size: "
|
|
35
|
+
size: "s",
|
|
36
36
|
"data-testid": "moneybuy-description"
|
|
37
37
|
}, item.description)), index < items.length - 1 && /*#__PURE__*/_react.default.createElement(_ImpactMoneybuys.OrLabel, {
|
|
38
38
|
tag: "span"
|
|
@@ -13,7 +13,10 @@ const fontSizes = {
|
|
|
13
13
|
xl: '2rem',
|
|
14
14
|
xxl: '3rem',
|
|
15
15
|
big: '4rem',
|
|
16
|
-
super: '5rem'
|
|
16
|
+
super: '5rem',
|
|
17
|
+
// Temporary edgecase fix to at least keep all sizing centralise
|
|
18
|
+
// before website project design review overhaul
|
|
19
|
+
error: '0.875rem'
|
|
17
20
|
};
|
|
18
21
|
var _default = size => {
|
|
19
22
|
if (size) {
|
package/package.json
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
exports[`renders correctly 1`] = `
|
|
4
4
|
.c0 {
|
|
5
5
|
color: #E52630;
|
|
6
|
+
font-size: 0.875rem;
|
|
7
|
+
line-height: 0.875rem;
|
|
6
8
|
text-transform: inherit;
|
|
7
9
|
line-height: normal;
|
|
8
10
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
@@ -19,7 +21,7 @@ exports[`renders correctly 1`] = `
|
|
|
19
21
|
<span
|
|
20
22
|
className="c0"
|
|
21
23
|
color="red"
|
|
22
|
-
size="
|
|
24
|
+
size="error"
|
|
23
25
|
>
|
|
24
26
|
<span
|
|
25
27
|
className="c1"
|
|
@@ -119,3 +119,15 @@ const ItalicText = styled(Text).attrs({weight: 'normal'})`
|
|
|
119
119
|
maxPxWidthLargeBreakpoint={250}
|
|
120
120
|
/>
|
|
121
121
|
```
|
|
122
|
+
|
|
123
|
+
```js
|
|
124
|
+
<h4>Input with dark label</h4>
|
|
125
|
+
<Input
|
|
126
|
+
name="dark-label"
|
|
127
|
+
placeholder="£0.00"
|
|
128
|
+
type="text"
|
|
129
|
+
label="The label text can be made black rather than the default grey"
|
|
130
|
+
id="input-example-8"
|
|
131
|
+
labelProps={{ darkLabel: true }}
|
|
132
|
+
/>
|
|
133
|
+
```
|
|
@@ -6,12 +6,22 @@ import Text from '../Text/Text';
|
|
|
6
6
|
import spacing from '../../../theme/shared/spacing';
|
|
7
7
|
import hideVisually from '../../../theme/shared/hideVisually';
|
|
8
8
|
|
|
9
|
+
const getLabelColor = ({ theme, errorMsg, darkLabel }) => {
|
|
10
|
+
if (errorMsg) {
|
|
11
|
+
return theme.color('red');
|
|
12
|
+
}
|
|
13
|
+
if (darkLabel) {
|
|
14
|
+
return theme.color('black');
|
|
15
|
+
}
|
|
16
|
+
return theme.color('grey_label');
|
|
17
|
+
};
|
|
18
|
+
|
|
9
19
|
const LabelElement = styled.label`
|
|
10
20
|
width: 100%;
|
|
11
21
|
position: relative;
|
|
12
22
|
display: flex;
|
|
13
23
|
flex-direction: column;
|
|
14
|
-
color: ${
|
|
24
|
+
color: ${getLabelColor};
|
|
15
25
|
|
|
16
26
|
${({ optional, theme }) => optional === true && `
|
|
17
27
|
:after {
|
|
@@ -45,6 +55,7 @@ const LabelText = ({
|
|
|
45
55
|
* @param children
|
|
46
56
|
* @param label
|
|
47
57
|
* @param hideLabel - Visually hide the label text (without removing it from the document)
|
|
58
|
+
* @param darkLabel - Make the label text black rather than the default grey
|
|
48
59
|
* @param rest
|
|
49
60
|
* @returns {JSX.Element}
|
|
50
61
|
* @constructor
|
|
@@ -53,6 +64,7 @@ const Label = ({
|
|
|
53
64
|
children = null,
|
|
54
65
|
label,
|
|
55
66
|
hideLabel = false,
|
|
67
|
+
darkLabel = false,
|
|
56
68
|
optional = null,
|
|
57
69
|
errorMsg = '',
|
|
58
70
|
...rest
|
|
@@ -60,6 +72,7 @@ const Label = ({
|
|
|
60
72
|
<LabelElement
|
|
61
73
|
optional={optional}
|
|
62
74
|
errorMsg={errorMsg}
|
|
75
|
+
darkLabel={darkLabel}
|
|
63
76
|
{...rest}
|
|
64
77
|
>
|
|
65
78
|
<LabelText
|
|
@@ -78,12 +91,14 @@ Label.propTypes = {
|
|
|
78
91
|
hideLabel: PropTypes.bool,
|
|
79
92
|
children: PropTypes.node,
|
|
80
93
|
optional: PropTypes.bool,
|
|
81
|
-
errorMsg: PropTypes.string
|
|
94
|
+
errorMsg: PropTypes.string,
|
|
95
|
+
darkLabel: PropTypes.bool
|
|
82
96
|
};
|
|
83
97
|
|
|
84
98
|
LabelElement.propTypes = {
|
|
85
99
|
optional: PropTypes.bool,
|
|
86
|
-
errorMsg: PropTypes.string
|
|
100
|
+
errorMsg: PropTypes.string,
|
|
101
|
+
darkLabel: PropTypes.bool
|
|
87
102
|
};
|
|
88
103
|
|
|
89
104
|
LabelText.propTypes = {
|
|
@@ -88,7 +88,7 @@ const Select = React.forwardRef(
|
|
|
88
88
|
</option>
|
|
89
89
|
))}
|
|
90
90
|
</StyledSelect>
|
|
91
|
-
{errorMsg && <ErrorText size="
|
|
91
|
+
{errorMsg && <ErrorText size="error" weight="bold" data-test="error-message">{errorMsg}</ErrorText>}
|
|
92
92
|
</Label>
|
|
93
93
|
);
|
|
94
94
|
}
|
|
@@ -49,7 +49,7 @@ const TextArea = React.forwardRef(({
|
|
|
49
49
|
aria-describedby={id}
|
|
50
50
|
ref={ref}
|
|
51
51
|
/>
|
|
52
|
-
{errorMsg && <ErrorText size="
|
|
52
|
+
{errorMsg && <ErrorText size="error" weight="bold" data-test="error-message">{errorMsg}</ErrorText>}
|
|
53
53
|
</Label>
|
|
54
54
|
));
|
|
55
55
|
|
|
@@ -45,7 +45,7 @@ const InfoBanner = ({
|
|
|
45
45
|
<Text tag="h3" size="md" uppercase>
|
|
46
46
|
Project Name
|
|
47
47
|
</Text>
|
|
48
|
-
<Text tag="p" size="
|
|
48
|
+
<Text tag="p" size="s">
|
|
49
49
|
{title}
|
|
50
50
|
</Text>
|
|
51
51
|
</Info>
|
|
@@ -53,7 +53,7 @@ const InfoBanner = ({
|
|
|
53
53
|
<Text tag="h3" size="md" uppercase>
|
|
54
54
|
End Date
|
|
55
55
|
</Text>
|
|
56
|
-
<Text tag="p" size="
|
|
56
|
+
<Text tag="p" size="s">
|
|
57
57
|
{endDate}
|
|
58
58
|
</Text>
|
|
59
59
|
</Info>
|
|
@@ -61,7 +61,7 @@ const InfoBanner = ({
|
|
|
61
61
|
<Text tag="h3" size="md" uppercase>
|
|
62
62
|
Funding theme
|
|
63
63
|
</Text>
|
|
64
|
-
<Text tag="p" size="
|
|
64
|
+
<Text tag="p" size="s">
|
|
65
65
|
<Link href={themeLink} target="self" type="standard">
|
|
66
66
|
{theme}
|
|
67
67
|
</Link>
|
|
@@ -71,7 +71,7 @@ const InfoBanner = ({
|
|
|
71
71
|
<Text tag="h3" size="md" uppercase>
|
|
72
72
|
Amount Awarded
|
|
73
73
|
</Text>
|
|
74
|
-
<Text tag="p" size="
|
|
74
|
+
<Text tag="p" size="s">
|
|
75
75
|
<CurrencyFormat
|
|
76
76
|
value={amount}
|
|
77
77
|
displayType="text"
|
|
@@ -85,7 +85,7 @@ const InfoBanner = ({
|
|
|
85
85
|
<Text tag="h3" size="md" uppercase>
|
|
86
86
|
Start Date
|
|
87
87
|
</Text>
|
|
88
|
-
<Text tag="p" size="
|
|
88
|
+
<Text tag="p" size="s">
|
|
89
89
|
{startDate}
|
|
90
90
|
</Text>
|
|
91
91
|
</Info>
|
|
@@ -93,7 +93,7 @@ const InfoBanner = ({
|
|
|
93
93
|
<Text tag="h3" size="md" uppercase>
|
|
94
94
|
Beneficiary Country
|
|
95
95
|
</Text>
|
|
96
|
-
<Text tag="p" size="
|
|
96
|
+
<Text tag="p" size="s">
|
|
97
97
|
{country}
|
|
98
98
|
</Text>
|
|
99
99
|
</Info>
|
|
@@ -7,6 +7,8 @@ exports[`renders correctly 1`] = `
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.c3 {
|
|
10
|
+
font-size: 1rem;
|
|
11
|
+
line-height: 1rem;
|
|
10
12
|
text-transform: inherit;
|
|
11
13
|
line-height: normal;
|
|
12
14
|
font-family: 'Montserrat',Helvetica,Arial,sans-serif;
|
|
@@ -88,7 +90,7 @@ exports[`renders correctly 1`] = `
|
|
|
88
90
|
<p
|
|
89
91
|
className="c3"
|
|
90
92
|
color="inherit"
|
|
91
|
-
size="
|
|
93
|
+
size="s"
|
|
92
94
|
>
|
|
93
95
|
Hello There
|
|
94
96
|
</p>
|
|
@@ -106,7 +108,7 @@ exports[`renders correctly 1`] = `
|
|
|
106
108
|
<p
|
|
107
109
|
className="c3"
|
|
108
110
|
color="inherit"
|
|
109
|
-
size="
|
|
111
|
+
size="s"
|
|
110
112
|
>
|
|
111
113
|
1st June 2020
|
|
112
114
|
</p>
|
|
@@ -124,7 +126,7 @@ exports[`renders correctly 1`] = `
|
|
|
124
126
|
<p
|
|
125
127
|
className="c3"
|
|
126
128
|
color="inherit"
|
|
127
|
-
size="
|
|
129
|
+
size="s"
|
|
128
130
|
>
|
|
129
131
|
<a
|
|
130
132
|
className="c4"
|
|
@@ -150,7 +152,7 @@ exports[`renders correctly 1`] = `
|
|
|
150
152
|
<p
|
|
151
153
|
className="c3"
|
|
152
154
|
color="inherit"
|
|
153
|
-
size="
|
|
155
|
+
size="s"
|
|
154
156
|
>
|
|
155
157
|
£2,000,000
|
|
156
158
|
</p>
|
|
@@ -168,7 +170,7 @@ exports[`renders correctly 1`] = `
|
|
|
168
170
|
<p
|
|
169
171
|
className="c3"
|
|
170
172
|
color="inherit"
|
|
171
|
-
size="
|
|
173
|
+
size="s"
|
|
172
174
|
>
|
|
173
175
|
1st June 2010
|
|
174
176
|
</p>
|
|
@@ -186,7 +188,7 @@ exports[`renders correctly 1`] = `
|
|
|
186
188
|
<p
|
|
187
189
|
className="c3"
|
|
188
190
|
color="inherit"
|
|
189
|
-
size="
|
|
191
|
+
size="s"
|
|
190
192
|
>
|
|
191
193
|
Uk
|
|
192
194
|
</p>
|
|
@@ -116,7 +116,7 @@ const EmailSignUp = ({
|
|
|
116
116
|
{/* This error can be set as part of the submit callback using RHF's `setError` function.
|
|
117
117
|
e.g. setError('formError', { message: 'Some error message'}) */}
|
|
118
118
|
{errors.formError !== undefined && (
|
|
119
|
-
<ErrorText>{errors.formError.message}</ErrorText>
|
|
119
|
+
<ErrorText size="error">{errors.formError.message}</ErrorText>
|
|
120
120
|
)}
|
|
121
121
|
</>
|
|
122
122
|
)}
|
|
@@ -16,7 +16,7 @@ const Moneybuys = ({ items, currentAmount, opacityAnimation }) => (
|
|
|
16
16
|
<Moneybuy isInactive={isInactive} data-testid={`impact-slider--moneybuy-${index + 1}`}>
|
|
17
17
|
<MoneybuyImage imageURL={item.imageURL} />
|
|
18
18
|
<MoneybuyAmount tag="p" family="Anton" uppercase weight="normal" size="xl" data-testid="moneybuy-amount">{thisAmount}</MoneybuyAmount>
|
|
19
|
-
<MoneybuyDescription tag="p" size="
|
|
19
|
+
<MoneybuyDescription tag="p" size="s" data-testid="moneybuy-description">{item.description}</MoneybuyDescription>
|
|
20
20
|
</Moneybuy>
|
|
21
21
|
{ index < (items.length - 1) && (
|
|
22
22
|
<OrLabel tag="span">Or</OrLabel>
|
|
@@ -7,7 +7,10 @@ const fontSizes = {
|
|
|
7
7
|
xl: '2rem',
|
|
8
8
|
xxl: '3rem',
|
|
9
9
|
big: '4rem',
|
|
10
|
-
super: '5rem'
|
|
10
|
+
super: '5rem',
|
|
11
|
+
// Temporary edgecase fix to at least keep all sizing centralise
|
|
12
|
+
// before website project design review overhaul
|
|
13
|
+
error: '0.875rem'
|
|
11
14
|
};
|
|
12
15
|
|
|
13
16
|
export default size => {
|