@comicrelief/component-library 5.8.5 → 6.0.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/PULL_REQUEST_TEMPLATE.md +27 -5
- package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.style.js +1 -1
- package/dist/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +2 -1
- package/dist/components/Organisms/Donate/Form/Form.js +6 -2
- package/dist/index.js +1 -1
- package/docs/installation.md +3 -3
- package/package.json +1 -1
- package/src/components/Molecules/SingleMessageDS/SingleMessageDs.style.js +2 -1
- package/src/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +2 -1
- package/src/components/Organisms/Donate/Form/Form.js +8 -1
- package/src/index.js +1 -1
- package/styleguide.config.js +1 -1
package/PULL_REQUEST_TEMPLATE.md
CHANGED
|
@@ -1,8 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
### PR Titles
|
|
2
|
+
#### To pass testing pipeline, these need to follow Conventional Commits spec:
|
|
3
|
+
https://www.conventionalcommits.org/en/v1.0.0/
|
|
4
|
+
e.g.
|
|
5
|
+
`feat: create NewForm component`
|
|
6
|
+
or
|
|
7
|
+
`fix: update broken link in NewForm component`
|
|
2
8
|
|
|
3
|
-
Fixes #
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
### PR description
|
|
11
|
+
#### What is it doing?
|
|
12
|
+
Tell us what it is doing from a technical perspective.
|
|
6
13
|
|
|
7
|
-
|
|
8
|
-
|
|
14
|
+
#### Why is this required?
|
|
15
|
+
Tell us why this is required from a business/product perspective.
|
|
16
|
+
|
|
17
|
+
#### link to Jira ticket:
|
|
18
|
+
Add a link to the Jira ticket.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Quick Checklist:
|
|
22
|
+
- [ ] My PR title follows the Conventional Commit spec.
|
|
23
|
+
|
|
24
|
+
- [ ] I have filled out the PR description as per the template above.
|
|
25
|
+
|
|
26
|
+
- [ ] I have added tests to cover new or changed behaviour.
|
|
27
|
+
|
|
28
|
+
- [ ] I have updated any relevant documentation.
|
|
29
|
+
|
|
30
|
+
### Important! - lastly, make sure to squash merge...
|
|
@@ -102,7 +102,7 @@ exports.CTA = CTA;
|
|
|
102
102
|
var Copy = _styledComponents.default.div.withConfig({
|
|
103
103
|
displayName: "SingleMessageDsstyle__Copy",
|
|
104
104
|
componentId: "sc-s8zd7s-8"
|
|
105
|
-
})(["position:relative;height:auto;padding:", ";", ";display:flex;flex-direction:column;border-radius:1rem;", ";background:", ";", ";", ";@media ", "{height:448px;width:calc(50% + 1.5rem);flex-grow:0;flex-shrink:0;flex-basis:calc(50% + 1.5rem);padding:", ";", ";", ";}@media ", "{padding:calc(", " * 2);", ";margin:", ";}"], (0, _spacing.default)('m'), (0, _zIndex.default)('low'), boxShadow, function (_ref10) {
|
|
105
|
+
})(["position:relative;height:auto;padding:", ";", ";display:flex;flex-direction:column;border-radius:1rem;", ";background:", ";", ";", ";@media ", "{min-height:448px;height:auto;width:calc(50% + 1.5rem);flex-grow:0;flex-shrink:0;flex-basis:calc(50% + 1.5rem);padding:", ";", ";", ";}@media ", "{padding:calc(", " * 2);", ";margin:", ";}"], (0, _spacing.default)('m'), (0, _zIndex.default)('low'), boxShadow, function (_ref10) {
|
|
106
106
|
var theme = _ref10.theme,
|
|
107
107
|
backgroundColor = _ref10.backgroundColor;
|
|
108
108
|
return theme.color(backgroundColor);
|
|
@@ -62,8 +62,12 @@ var Signup = function Signup(_ref) {
|
|
|
62
62
|
setMoneyBuyCopy = _useState8[1];
|
|
63
63
|
|
|
64
64
|
(0, _react.useEffect)(function () {
|
|
65
|
-
var givingData = givingType === 'single' ? singleGiving : regularGiving;
|
|
66
|
-
|
|
65
|
+
var givingData = givingType === 'single' ? singleGiving : regularGiving; // Check the 2nd moneybuy exists before using it;
|
|
66
|
+
// 'philantrophy' carts have been set up to use a single moneybuy.
|
|
67
|
+
// See ENG-1685 for more details
|
|
68
|
+
|
|
69
|
+
var thisAmount = givingData.moneybuys[1] ? givingData.moneybuys[1].value : givingData.moneybuys[0].value;
|
|
70
|
+
setAmountDonate(parseFloat(thisAmount));
|
|
67
71
|
}, [givingType, singleGiving, regularGiving]);
|
|
68
72
|
(0, _react.useEffect)(function () {
|
|
69
73
|
var givingData = givingType === 'single' ? singleGiving : regularGiving;
|
package/dist/index.js
CHANGED
|
@@ -101,7 +101,7 @@ Object.defineProperty(exports, "Button", {
|
|
|
101
101
|
return _Button.default;
|
|
102
102
|
}
|
|
103
103
|
});
|
|
104
|
-
Object.defineProperty(exports, "
|
|
104
|
+
Object.defineProperty(exports, "RadioButton", {
|
|
105
105
|
enumerable: true,
|
|
106
106
|
get: function get() {
|
|
107
107
|
return _RadioButton.default;
|
package/docs/installation.md
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
CR-CL has a dependency of Styled-components.
|
|
4
4
|
|
|
5
5
|
#### Install the package
|
|
6
|
-
`yarn add @comicrelief/component-library`
|
|
6
|
+
`yarn add @comicrelief/component-library`
|
|
7
7
|
|
|
8
8
|
#### Wrap your app with the ThemeProvider and crTheme
|
|
9
|
-
`import { ThemeProvider,
|
|
9
|
+
`import { ThemeProvider, crTheme } from '@comicrelief/component-library';`
|
|
10
10
|
|
|
11
11
|
#### Import components
|
|
12
|
-
`import { HeroBanner } from '@
|
|
12
|
+
`import { HeroBanner } from '@comicrelief/component-library';`
|
package/package.json
CHANGED
|
@@ -40,7 +40,14 @@ const Signup = ({
|
|
|
40
40
|
useEffect(() => {
|
|
41
41
|
const givingData = givingType === 'single' ? singleGiving : regularGiving;
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
// Check the 2nd moneybuy exists before using it;
|
|
44
|
+
// 'philantrophy' carts have been set up to use a single moneybuy.
|
|
45
|
+
// See ENG-1685 for more details
|
|
46
|
+
const thisAmount = givingData.moneybuys[1]
|
|
47
|
+
? givingData.moneybuys[1].value
|
|
48
|
+
: givingData.moneybuys[0].value;
|
|
49
|
+
|
|
50
|
+
setAmountDonate(parseFloat(thisAmount));
|
|
44
51
|
}, [givingType, singleGiving, regularGiving]);
|
|
45
52
|
|
|
46
53
|
useEffect(() => {
|
package/src/index.js
CHANGED
|
@@ -18,7 +18,7 @@ export { default as Logo } from './components/Atoms/Logo/Logo';
|
|
|
18
18
|
export { default as Picture } from './components/Atoms/Picture/Picture';
|
|
19
19
|
export { default as Link } from './components/Atoms/Link/Link';
|
|
20
20
|
export { default as Button } from './components/Atoms/Button/Button';
|
|
21
|
-
export { default as
|
|
21
|
+
export { default as RadioButton } from './components/Atoms/RadioButton/RadioButton';
|
|
22
22
|
export { default as Checkbox } from './components/Atoms/Checkbox/Checkbox';
|
|
23
23
|
export { default as Input } from './components/Atoms/Input/Input';
|
|
24
24
|
export { default as Select } from './components/Atoms/Select/Select';
|
package/styleguide.config.js
CHANGED
|
@@ -3,7 +3,7 @@ const path = require('path');
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
getComponentPathLine(componentPath) {
|
|
5
5
|
const name = path.basename(componentPath, '.js');
|
|
6
|
-
return `import { ${name} } from '@
|
|
6
|
+
return `import { ${name} } from '@comicrelief/component-library';`;
|
|
7
7
|
},
|
|
8
8
|
assetsDir: 'src/styleguide/assets/',
|
|
9
9
|
styleguideComponents: {
|