@comicrelief/component-library 8.25.7 → 8.26.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/Picture/Picture.js +9 -24
- package/dist/components/Atoms/Picture/Picture.test.js +4 -4
- package/dist/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +2 -2
- package/dist/components/Molecules/Card/__snapshots__/Card.test.js.snap +6 -0
- package/dist/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +28 -0
- package/dist/components/Molecules/PartnerLink/PartnerLink.test.js +1 -1
- package/dist/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +28 -0
- package/dist/components/Molecules/SearchResult/__snapshots__/SearchResult.test.js.snap +24 -0
- package/dist/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +78 -0
- package/dist/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +14 -0
- package/dist/components/Organisms/Donate/Donate.js +1 -2
- package/dist/components/Organisms/Donate/GivingSelector/GivingSelector.js +2 -2
- package/dist/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +4 -8
- package/dist/components/Organisms/Membership/Membership.test.js +1 -1
- package/package.json +1 -1
- package/src/components/Atoms/Picture/Picture.js +21 -19
- package/src/components/Atoms/Picture/Picture.test.js +29 -7
- package/src/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +28 -0
- package/src/components/Molecules/Card/__snapshots__/Card.test.js.snap +6 -0
- package/src/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +28 -0
- package/src/components/Molecules/PartnerLink/PartnerLink.test.js +8 -0
- package/src/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +28 -0
- package/src/components/Molecules/SearchResult/__snapshots__/SearchResult.test.js.snap +24 -0
- package/src/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +78 -0
- package/src/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +14 -0
- package/src/components/Organisms/Donate/Donate.js +1 -1
- package/src/components/Organisms/Donate/GivingSelector/GivingSelector.js +2 -2
- package/src/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +4 -8
- package/src/components/Organisms/Membership/Membership.test.js +6 -0
|
@@ -22,5 +22,5 @@ it('renders correctly', () => {
|
|
|
22
22
|
subtitle: "Jordan was close to suicide - which is now the biggest killer of men under 45 in the UK. Join now and help save lives.",
|
|
23
23
|
otherDescription: "Your donation will help us fund amazing projects in the UK and around the world."
|
|
24
24
|
})).toJSON();
|
|
25
|
-
expect(tree).toMatchInlineSnapshot("\n .c6 {\n font-size: 1.5rem;\n line-height: 1.5rem;\n text-transform: inherit;\n font-weight: 800;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c7 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c12 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c22 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n font-weight: 500;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c1 {\n display: block;\n width: 100%;\n height: 100%;\n position: relative;\n }\n\n .c3 {\n width: 100%;\n height: 100%;\n display: block;\n object-fit: cover;\n }\n\n .c14 {\n width: 100%;\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n color: #5C5C5E;\n }\n\n .c16 {\n margin-bottom: 0.5rem;\n font-weight: normal;\n }\n\n .c17 {\n position: relative;\n font-size: 1.25rem;\n }\n\n .c18 {\n position: relative;\n width: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: end;\n -webkit-justify-content: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .c19 {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 48px;\n padding: 1rem 2.4rem 1rem 1.5rem;\n background-color: #F4F3F5;\n border: 1px solid;\n border-color: #E1E2E3;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n color: #000000;\n border-radius: 0.5rem;\n font-size: inherit;\n z-index: 2;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c19:focus {\n border: 1px solid #666;\n }\n\n .c15 {\n display: block;\n }\n\n .c15 input {\n border: 2px solid #E1E2E3;\n font-size: 1.5rem;\n font-weight: 800;\n -webkit-letter-spacing: -2px;\n -moz-letter-spacing: -2px;\n -ms-letter-spacing: -2px;\n letter-spacing: -2px;\n height: auto;\n }\n\n .c20 {\n display: block;\n }\n\n .c20 input {\n border: 2px solid #E1E2E3;\n font-size: 1.5rem;\n font-weight: 800;\n -webkit-letter-spacing: -2px;\n -moz-letter-spacing: -2px;\n -ms-letter-spacing: -2px;\n letter-spacing: -2px;\n height: auto;\n border-color: #E52630;\n background-color: #E52630;\n color: #FFFFFF;\n }\n\n .c0 {\n background-color: #FEE3CC;\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n min-height: 100vh;\n }\n\n .c2 {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: auto;\n }\n\n .c2:before {\n color: #FEE3CC;\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n box-shadow: inset 0px 4rem 2rem -2rem;\n }\n\n .c4 {\n position: relative;\n max-width: 320px;\n text-align: center;\n margin-bottom: 50%;\n }\n\n .c5 {\n padding: 2rem 1rem 0;\n margin-bottom: 2rem;\n }\n\n .c8 {\n background-color: #FFFFFF;\n box-shadow: 0px 1rem 4rem rgba(0,0,0,0.3);\n height: 450px;\n }\n\n .c9 {\n padding: 1rem;\n }\n\n .c9 h3 {\n margin-top: 1rem;\n }\n\n .c9 input {\n max-width: 100%;\n margin: 0;\n }\n\n .c10 {\n padding: 0;\n margin: 0;\n border: none;\n }\n\n .c10 > :not(:last-child):not(legend) {\n margin-bottom: 2rem;\n }\n\n .c11 {\n margin: 0;\n padding: 0;\n }\n\n .c13 {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -webkit-justify-content: space-between;\n -ms-flex-pack: justify;\n justify-content: space-between;\n }\n\n .c13 label {\n -webkit-flex: 0 0 30%;\n -ms-flex: 0 0 30%;\n flex: 0 0 30%;\n }\n\n .c13 label input {\n cursor: pointer;\n padding: 1rem;\n }\n\n .c13 label:hover input {\n border-color: #E52630;\n }\n\n .c21 {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .c23 {\n margin-right: auto;\n }\n\n .c24 {\n position: relative;\n -webkit-flex: 0 0 50%;\n -ms-flex: 0 0 50%;\n flex: 0 0 50%;\n font-weight: 400;\n display: block;\n }\n\n .c24 span {\n position: absolute;\n padding: 0px 15px;\n font-size: 20px;\n top: 50%;\n -webkit-transform: translateY(-50%);\n -ms-transform: translateY(-50%);\n transform: translateY(-50%);\n left: 0px;\n font-weight: 500;\n }\n\n .c24 input {\n border: 2px solid #E1E2E3;\n background: transparent;\n padding: 0.5rem 1rem 0.5rem 2rem;\n }\n\n .c24 input:focus {\n border: 2px solid #E52630;\n }\n\n .c26 {\n line-height: 1.5;\n }\n\n .c25 {\n width: 100%;\n color: #FFFFFF;\n font-size: 1rem;\n font-weight: bold;\n cursor: pointer;\n padding: 1rem 0.5rem;\n background: #E52630;\n border: none;\n border-radius: 100px;\n }\n\n .c25:active,\n .c25:focus,\n .c25:hover {\n background-color: #961D35;\n }\n\n @media (min-width:740px) {\n\n }\n\n @media (min-width:1024px) {\n\n }\n\n @media (min-width:1024px) {\n .c0 {\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: inherit;\n -webkit-justify-content: inherit;\n -ms-flex-pack: inherit;\n justify-content: inherit;\n min-height: 750px;\n height: 100vh;\n max-height: 900px;\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n }\n }\n\n @media (min-width:1024px) {\n .c2 {\n height: 100%;\n }\n\n .c2:before {\n content: none;\n }\n }\n\n @media (min-width:1024px) {\n .c4 {\n margin: 0 8rem;\n max-width: 420px;\n }\n }\n\n @media (min-width:1024px) {\n .c8 {\n height: 430px;\n }\n }\n\n @media (min-width:1024px) {\n .c24 {\n -webkit-flex: 0 0 60%;\n -ms-flex: 0 0 60%;\n flex: 0 0 60%;\n }\n }\n\n @media (min-width:1024px) {\n .c25 {\n width: auto;\n padding: 1rem 2rem;\n margin: 0 auto 2rem;\n }\n }\n\n <div\n className=\"c0\"\n id=\"mship-1\"\n >\n <div\n className=\"c1 c2\"\n height=\"100%\"\n width=\"100%\"\n >\n <img\n alt=\"Background image\"\n className=\"c3 lazyload\"\n data-src={null}\n height=\"100%\"\n width=\"100%\"\n />\n </div>\n <div\n className=\"c4\"\n >\n <div\n className=\"c5\"\n >\n <h2\n className=\"c6\"\n color=\"inherit\"\n size=\"l\"\n >\n Help someone like Jordan see a better tomorrow\n </h2>\n <p\n className=\"c7\"\n color=\"inherit\"\n size=\"s\"\n >\n Jordan was close to suicide - which is now the biggest killer of men under 45 in the UK. Join now and help save lives.\n </p>\n </div>\n <div\n className=\"c8\"\n >\n <form\n className=\"c9\"\n onSubmit={[Function]}\n >\n <fieldset\n className=\"c10\"\n >\n <legend\n className=\"c11\"\n >\n <h3\n className=\"c12\"\n color=\"inherit\"\n size=\"s\"\n >\n Choose your monthly donation\n </h3>\n </legend>\n <div\n className=\"c13\"\n >\n <label\n className=\"c14 c15\"\n htmlFor=\"mship-1--moneyBuy-box1\"\n >\n <span\n className=\"c7 c16\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c17\"\n >\n \n <div\n className=\"c18\"\n >\n <input\n aria-describedby=\"mship-1--moneyBuy-box1\"\n aria-label=\"\xA35\"\n className=\"c19\"\n id=\"mship-1--moneyBuy-box1\"\n name=\"mship-1--moneyBuy1\"\n onClick={[Function]}\n placeholder=\"\"\n required={false}\n type=\"button\"\n value=\"\xA3 5\"\n />\n \n </div>\n </div>\n \n </label>\n <label\n className=\"c14 c20\"\n htmlFor=\"mship-1--moneyBuy-box2\"\n >\n <span\n className=\"c7 c16\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c17\"\n >\n \n <div\n className=\"c18\"\n >\n <input\n aria-describedby=\"mship-1--moneyBuy-box2\"\n aria-label=\"\xA310\"\n className=\"c19\"\n id=\"mship-1--moneyBuy-box2\"\n name=\"mship-1--moneyBuy2\"\n onClick={[Function]}\n placeholder=\"\"\n required={false}\n type=\"button\"\n value=\"\xA3 10\"\n />\n \n </div>\n </div>\n \n </label>\n <label\n className=\"c14 c15\"\n htmlFor=\"mship-1--moneyBuy-box3\"\n >\n <span\n className=\"c7 c16\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c17\"\n >\n \n <div\n className=\"c18\"\n >\n <input\n aria-describedby=\"mship-1--moneyBuy-box3\"\n aria-label=\"\xA320\"\n className=\"c19\"\n id=\"mship-1--moneyBuy-box3\"\n name=\"mship-1--moneyBuy3\"\n onClick={[Function]}\n placeholder=\"\"\n required={false}\n type=\"button\"\n value=\"\xA3 20\"\n />\n \n </div>\n </div>\n \n </label>\n </div>\n <div\n className=\"c21\"\n >\n <span\n className=\"c22 c23\"\n color=\"inherit\"\n size=\"s\"\n >\n Other amount\n </span>\n <label\n className=\"c14 c24\"\n htmlFor=\"mship-1--MoneyBuy-userInput\"\n >\n <span\n className=\"c7 c16\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"\xA3\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c17\"\n >\n \n <div\n className=\"c18\"\n >\n <input\n aria-describedby=\"mship-1--MoneyBuy-userInput\"\n aria-label=\"Input a different amount\"\n className=\"c19\"\n id=\"mship-1--MoneyBuy-userInput\"\n max=\"25000\"\n min=\"1\"\n name=\"membership_amount\"\n onChange={[Function]}\n onClick={[Function]}\n onKeyPress={[Function]}\n pattern=\"[^[0-9]+([,.][0-9]+)?$]\"\n placeholder=\"0.00\"\n required={false}\n step=\"0.01\"\n type=\"number\"\n value=\"\"\n />\n \n </div>\n </div>\n \n </label>\n </div>\n <input\n className=\"c25\"\n type=\"submit\"\n value=\"Donate\"\n />\n <p\n className=\"c26\"\n />\n </fieldset>\n </form>\n </div>\n </div>\n </div>\n ");
|
|
25
|
+
expect(tree).toMatchInlineSnapshot("\n .c6 {\n font-size: 1.5rem;\n line-height: 1.5rem;\n text-transform: inherit;\n font-weight: 800;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c7 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c12 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c22 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n font-weight: 500;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c1 {\n display: block;\n width: 100%;\n height: 100%;\n position: relative;\n }\n\n .c3 {\n width: 100%;\n height: 100%;\n display: block;\n object-fit: cover;\n }\n\n .c14 {\n width: 100%;\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n color: #5C5C5E;\n }\n\n .c16 {\n margin-bottom: 0.5rem;\n font-weight: normal;\n }\n\n .c17 {\n position: relative;\n font-size: 1.25rem;\n }\n\n .c18 {\n position: relative;\n width: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: end;\n -webkit-justify-content: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .c19 {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 48px;\n padding: 1rem 2.4rem 1rem 1.5rem;\n background-color: #F4F3F5;\n border: 1px solid;\n border-color: #E1E2E3;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n color: #000000;\n border-radius: 0.5rem;\n font-size: inherit;\n z-index: 2;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c19:focus {\n border: 1px solid #666;\n }\n\n .c15 {\n display: block;\n }\n\n .c15 input {\n border: 2px solid #E1E2E3;\n font-size: 1.5rem;\n font-weight: 800;\n -webkit-letter-spacing: -2px;\n -moz-letter-spacing: -2px;\n -ms-letter-spacing: -2px;\n letter-spacing: -2px;\n height: auto;\n }\n\n .c20 {\n display: block;\n }\n\n .c20 input {\n border: 2px solid #E1E2E3;\n font-size: 1.5rem;\n font-weight: 800;\n -webkit-letter-spacing: -2px;\n -moz-letter-spacing: -2px;\n -ms-letter-spacing: -2px;\n letter-spacing: -2px;\n height: auto;\n border-color: #E52630;\n background-color: #E52630;\n color: #FFFFFF;\n }\n\n .c0 {\n background-color: #FEE3CC;\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n min-height: 100vh;\n }\n\n .c2 {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: auto;\n }\n\n .c2:before {\n color: #FEE3CC;\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n box-shadow: inset 0px 4rem 2rem -2rem;\n }\n\n .c4 {\n position: relative;\n max-width: 320px;\n text-align: center;\n margin-bottom: 50%;\n }\n\n .c5 {\n padding: 2rem 1rem 0;\n margin-bottom: 2rem;\n }\n\n .c8 {\n background-color: #FFFFFF;\n box-shadow: 0px 1rem 4rem rgba(0,0,0,0.3);\n height: 450px;\n }\n\n .c9 {\n padding: 1rem;\n }\n\n .c9 h3 {\n margin-top: 1rem;\n }\n\n .c9 input {\n max-width: 100%;\n margin: 0;\n }\n\n .c10 {\n padding: 0;\n margin: 0;\n border: none;\n }\n\n .c10 > :not(:last-child):not(legend) {\n margin-bottom: 2rem;\n }\n\n .c11 {\n margin: 0;\n padding: 0;\n }\n\n .c13 {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -webkit-justify-content: space-between;\n -ms-flex-pack: justify;\n justify-content: space-between;\n }\n\n .c13 label {\n -webkit-flex: 0 0 30%;\n -ms-flex: 0 0 30%;\n flex: 0 0 30%;\n }\n\n .c13 label input {\n cursor: pointer;\n padding: 1rem;\n }\n\n .c13 label:hover input {\n border-color: #E52630;\n }\n\n .c21 {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .c23 {\n margin-right: auto;\n }\n\n .c24 {\n position: relative;\n -webkit-flex: 0 0 50%;\n -ms-flex: 0 0 50%;\n flex: 0 0 50%;\n font-weight: 400;\n display: block;\n }\n\n .c24 span {\n position: absolute;\n padding: 0px 15px;\n font-size: 20px;\n top: 50%;\n -webkit-transform: translateY(-50%);\n -ms-transform: translateY(-50%);\n transform: translateY(-50%);\n left: 0px;\n font-weight: 500;\n }\n\n .c24 input {\n border: 2px solid #E1E2E3;\n background: transparent;\n padding: 0.5rem 1rem 0.5rem 2rem;\n }\n\n .c24 input:focus {\n border: 2px solid #E52630;\n }\n\n .c26 {\n line-height: 1.5;\n }\n\n .c25 {\n width: 100%;\n color: #FFFFFF;\n font-size: 1rem;\n font-weight: bold;\n cursor: pointer;\n padding: 1rem 0.5rem;\n background: #E52630;\n border: none;\n border-radius: 100px;\n }\n\n .c25:active,\n .c25:focus,\n .c25:hover {\n background-color: #961D35;\n }\n\n @supports not ((object-fit:cover) or (object-fit:contain)) {\n .c3 {\n visibility: hidden;\n }\n }\n\n @media (min-width:740px) {\n\n }\n\n @media (min-width:1024px) {\n\n }\n\n @media (min-width:1024px) {\n .c0 {\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: inherit;\n -webkit-justify-content: inherit;\n -ms-flex-pack: inherit;\n justify-content: inherit;\n min-height: 750px;\n height: 100vh;\n max-height: 900px;\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n }\n }\n\n @media (min-width:1024px) {\n .c2 {\n height: 100%;\n }\n\n .c2:before {\n content: none;\n }\n }\n\n @media (min-width:1024px) {\n .c4 {\n margin: 0 8rem;\n max-width: 420px;\n }\n }\n\n @media (min-width:1024px) {\n .c8 {\n height: 430px;\n }\n }\n\n @media (min-width:1024px) {\n .c24 {\n -webkit-flex: 0 0 60%;\n -ms-flex: 0 0 60%;\n flex: 0 0 60%;\n }\n }\n\n @media (min-width:1024px) {\n .c25 {\n width: auto;\n padding: 1rem 2rem;\n margin: 0 auto 2rem;\n }\n }\n\n <div\n className=\"c0\"\n id=\"mship-1\"\n >\n <div\n className=\"c1 c2\"\n height=\"100%\"\n width=\"100%\"\n >\n <img\n alt=\"Background image\"\n className=\"c3 lazyload\"\n data-src={null}\n height=\"100%\"\n width=\"100%\"\n />\n </div>\n <div\n className=\"c4\"\n >\n <div\n className=\"c5\"\n >\n <h2\n className=\"c6\"\n color=\"inherit\"\n size=\"l\"\n >\n Help someone like Jordan see a better tomorrow\n </h2>\n <p\n className=\"c7\"\n color=\"inherit\"\n size=\"s\"\n >\n Jordan was close to suicide - which is now the biggest killer of men under 45 in the UK. Join now and help save lives.\n </p>\n </div>\n <div\n className=\"c8\"\n >\n <form\n className=\"c9\"\n onSubmit={[Function]}\n >\n <fieldset\n className=\"c10\"\n >\n <legend\n className=\"c11\"\n >\n <h3\n className=\"c12\"\n color=\"inherit\"\n size=\"s\"\n >\n Choose your monthly donation\n </h3>\n </legend>\n <div\n className=\"c13\"\n >\n <label\n className=\"c14 c15\"\n htmlFor=\"mship-1--moneyBuy-box1\"\n >\n <span\n className=\"c7 c16\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c17\"\n >\n \n <div\n className=\"c18\"\n >\n <input\n aria-describedby=\"mship-1--moneyBuy-box1\"\n aria-label=\"\xA35\"\n className=\"c19\"\n id=\"mship-1--moneyBuy-box1\"\n name=\"mship-1--moneyBuy1\"\n onClick={[Function]}\n placeholder=\"\"\n required={false}\n type=\"button\"\n value=\"\xA3 5\"\n />\n \n </div>\n </div>\n \n </label>\n <label\n className=\"c14 c20\"\n htmlFor=\"mship-1--moneyBuy-box2\"\n >\n <span\n className=\"c7 c16\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c17\"\n >\n \n <div\n className=\"c18\"\n >\n <input\n aria-describedby=\"mship-1--moneyBuy-box2\"\n aria-label=\"\xA310\"\n className=\"c19\"\n id=\"mship-1--moneyBuy-box2\"\n name=\"mship-1--moneyBuy2\"\n onClick={[Function]}\n placeholder=\"\"\n required={false}\n type=\"button\"\n value=\"\xA3 10\"\n />\n \n </div>\n </div>\n \n </label>\n <label\n className=\"c14 c15\"\n htmlFor=\"mship-1--moneyBuy-box3\"\n >\n <span\n className=\"c7 c16\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c17\"\n >\n \n <div\n className=\"c18\"\n >\n <input\n aria-describedby=\"mship-1--moneyBuy-box3\"\n aria-label=\"\xA320\"\n className=\"c19\"\n id=\"mship-1--moneyBuy-box3\"\n name=\"mship-1--moneyBuy3\"\n onClick={[Function]}\n placeholder=\"\"\n required={false}\n type=\"button\"\n value=\"\xA3 20\"\n />\n \n </div>\n </div>\n \n </label>\n </div>\n <div\n className=\"c21\"\n >\n <span\n className=\"c22 c23\"\n color=\"inherit\"\n size=\"s\"\n >\n Other amount\n </span>\n <label\n className=\"c14 c24\"\n htmlFor=\"mship-1--MoneyBuy-userInput\"\n >\n <span\n className=\"c7 c16\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"\xA3\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c17\"\n >\n \n <div\n className=\"c18\"\n >\n <input\n aria-describedby=\"mship-1--MoneyBuy-userInput\"\n aria-label=\"Input a different amount\"\n className=\"c19\"\n id=\"mship-1--MoneyBuy-userInput\"\n max=\"25000\"\n min=\"1\"\n name=\"membership_amount\"\n onChange={[Function]}\n onClick={[Function]}\n onKeyPress={[Function]}\n pattern=\"[^[0-9]+([,.][0-9]+)?$]\"\n placeholder=\"0.00\"\n required={false}\n step=\"0.01\"\n type=\"number\"\n value=\"\"\n />\n \n </div>\n </div>\n \n </label>\n </div>\n <input\n className=\"c25\"\n type=\"submit\"\n value=\"Donate\"\n />\n <p\n className=\"c26\"\n />\n </fieldset>\n </form>\n </div>\n </div>\n </div>\n ");
|
|
26
26
|
});
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import styled, { css, withTheme } from 'styled-components';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import spacing from '../../../theme/shared/spacing';
|
|
@@ -10,22 +10,39 @@ import 'lazysizes/plugins/blur-up/ls.blur-up';
|
|
|
10
10
|
const IMAGE_FALLBACK = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
|
|
11
11
|
|
|
12
12
|
const Wrapper = styled.div`
|
|
13
|
-
|
|
13
|
+
// If this browser doesn't support objectFit:
|
|
14
|
+
${({ nonObjFitImage }) => (nonObjFitImage)
|
|
15
|
+
&& `@supports not ((object-fit: cover) or (object-fit: none) or (object-fit: contain)) {
|
|
16
|
+
background-image: url(${nonObjFitImage});
|
|
17
|
+
background-size: cover;
|
|
18
|
+
background-position: center;
|
|
19
|
+
}
|
|
20
|
+
`};
|
|
21
|
+
|
|
14
22
|
display: block;
|
|
15
23
|
width: ${props => (props.width ? props.width : '100%')};
|
|
16
24
|
height: ${props => (props.height ? props.height : '100%')};
|
|
17
25
|
position: relative;
|
|
18
|
-
|
|
26
|
+
|
|
27
|
+
${({ isBackgroundImage }) => isBackgroundImage
|
|
28
|
+
&& 'position: absolute; bottom: 0px; left: 0px; right: 0px; height: 100%;'};
|
|
19
29
|
`;
|
|
20
30
|
|
|
21
31
|
const Image = styled.img`
|
|
22
32
|
width: ${props => (props.width ? props.width : '100%')};
|
|
23
33
|
height: ${props => (props.height ? props.height : 'auto')};
|
|
24
34
|
display: block;
|
|
35
|
+
|
|
25
36
|
object-fit: ${props => (props.objectFit === 'none' && 'none')
|
|
26
37
|
|| (props.objectFit === 'cover' && 'cover')
|
|
27
38
|
|| (props.objectFit === 'contain' && 'contain')};
|
|
28
|
-
|
|
39
|
+
|
|
40
|
+
// If this browser doesn't support objectFit:
|
|
41
|
+
${({ objectFit }) => (objectFit !== 'none')
|
|
42
|
+
&& `@supports not ((object-fit: cover) or (object-fit: contain)) {
|
|
43
|
+
visibility: hidden;
|
|
44
|
+
`}
|
|
45
|
+
// Allows image to provide the container height, but make it invisible
|
|
29
46
|
|
|
30
47
|
/* Check for Cards/smallBreakpointRowLayout prop coming from the CMS and adjust styling for row view */
|
|
31
48
|
${({ smallBreakpointRowLayout }) => (smallBreakpointRowLayout === true) && css`
|
|
@@ -60,7 +77,6 @@ const Image = styled.img`
|
|
|
60
77
|
height: ${props => (props.height ? props.height : 'auto')};
|
|
61
78
|
}
|
|
62
79
|
`}
|
|
63
|
-
|
|
64
80
|
`;
|
|
65
81
|
|
|
66
82
|
/** Responsive Picture */
|
|
@@ -77,17 +93,8 @@ const Picture = ({
|
|
|
77
93
|
mediumBreakpointRowLayout = null,
|
|
78
94
|
...rest
|
|
79
95
|
}) => {
|
|
80
|
-
const document = typeof window !== 'undefined' ? window.document : null;
|
|
81
|
-
const [objFitState, setObjFitState] = useState(true);
|
|
82
96
|
let nonObjFitImage = null;
|
|
83
97
|
|
|
84
|
-
useEffect(() => {
|
|
85
|
-
// Once document is available, determine if this browser supports object-fit
|
|
86
|
-
if ('objectFit' in document.documentElement.style === false) {
|
|
87
|
-
setObjFitState(false);
|
|
88
|
-
}
|
|
89
|
-
}, [document]);
|
|
90
|
-
|
|
91
98
|
// Determine which image will be used for the nonObjectFit fallback
|
|
92
99
|
if (image) {
|
|
93
100
|
nonObjFitImage = image;
|
|
@@ -104,7 +111,6 @@ const Picture = ({
|
|
|
104
111
|
images={images}
|
|
105
112
|
isBackgroundImage={isBackgroundImage}
|
|
106
113
|
nonObjFitImage={nonObjFitImage}
|
|
107
|
-
objFitState={objFitState}
|
|
108
114
|
{...rest}
|
|
109
115
|
>
|
|
110
116
|
<Image
|
|
@@ -114,7 +120,6 @@ const Picture = ({
|
|
|
114
120
|
objectFit={objectFit}
|
|
115
121
|
data-src={image}
|
|
116
122
|
className="lazyload"
|
|
117
|
-
objFitState={objFitState}
|
|
118
123
|
/>
|
|
119
124
|
</Wrapper>
|
|
120
125
|
);
|
|
@@ -126,11 +131,9 @@ const Picture = ({
|
|
|
126
131
|
width={width}
|
|
127
132
|
image={image}
|
|
128
133
|
images={images}
|
|
129
|
-
setObjFitState={setObjFitState}
|
|
130
134
|
className="lazyload"
|
|
131
135
|
isBackgroundImage={isBackgroundImage}
|
|
132
136
|
nonObjFitImage={nonObjFitImage}
|
|
133
|
-
objFitState={objFitState}
|
|
134
137
|
{...rest}
|
|
135
138
|
>
|
|
136
139
|
<Image
|
|
@@ -145,7 +148,6 @@ const Picture = ({
|
|
|
145
148
|
data-sizes="auto"
|
|
146
149
|
data-lowsrc={imageLow}
|
|
147
150
|
className="lazyload"
|
|
148
|
-
objFitState={objFitState}
|
|
149
151
|
smallBreakpointRowLayout={smallBreakpointRowLayout}
|
|
150
152
|
mediumBreakpointRowLayout={mediumBreakpointRowLayout}
|
|
151
153
|
/>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import
|
|
3
|
-
import renderWithTheme from
|
|
4
|
-
import Picture from
|
|
5
|
-
import { defaultData } from
|
|
6
|
-
it(
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import 'jest-styled-components';
|
|
3
|
+
import renderWithTheme from '../../../../tests/hoc/shallowWithTheme';
|
|
4
|
+
import Picture from './Picture';
|
|
5
|
+
import { defaultData } from '../../../styleguide/data/data';
|
|
6
|
+
it('renders correctly', () => {
|
|
7
7
|
const tree = renderWithTheme(
|
|
8
8
|
<Picture
|
|
9
9
|
images={defaultData.images}
|
|
@@ -27,6 +27,14 @@ it("renders correctly", () => {
|
|
|
27
27
|
object-fit: none;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
31
|
+
.c0 {
|
|
32
|
+
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
33
|
+
background-size: cover;
|
|
34
|
+
background-position: center;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
30
38
|
<div
|
|
31
39
|
className="c0 lazyload"
|
|
32
40
|
height="auto"
|
|
@@ -48,7 +56,7 @@ it("renders correctly", () => {
|
|
|
48
56
|
`);
|
|
49
57
|
});
|
|
50
58
|
|
|
51
|
-
it(
|
|
59
|
+
it('renders correctly with custom props', () => {
|
|
52
60
|
const tree = renderWithTheme(
|
|
53
61
|
<Picture
|
|
54
62
|
images={defaultData.images}
|
|
@@ -75,6 +83,20 @@ it("renders correctly with custom props", () => {
|
|
|
75
83
|
object-fit: cover;
|
|
76
84
|
}
|
|
77
85
|
|
|
86
|
+
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
87
|
+
.c0 {
|
|
88
|
+
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
89
|
+
background-size: cover;
|
|
90
|
+
background-position: center;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
95
|
+
.c1 {
|
|
96
|
+
visibility: hidden;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
78
100
|
<div
|
|
79
101
|
className="c0 lazyload"
|
|
80
102
|
height="100px"
|
|
@@ -154,6 +154,20 @@ it('renders article teaser correctly', () => {
|
|
|
154
154
|
display: flex;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
+
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
158
|
+
.c4 {
|
|
159
|
+
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
160
|
+
background-size: cover;
|
|
161
|
+
background-position: center;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
166
|
+
.c6 {
|
|
167
|
+
visibility: hidden;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
157
171
|
@media (min-width:740px) {
|
|
158
172
|
.c2 {
|
|
159
173
|
-webkit-flex-direction: row;
|
|
@@ -411,6 +425,20 @@ it('renders press realese correctly', () => {
|
|
|
411
425
|
display: flex;
|
|
412
426
|
}
|
|
413
427
|
|
|
428
|
+
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
429
|
+
.c4 {
|
|
430
|
+
background-image: url(mock.asset);
|
|
431
|
+
background-size: cover;
|
|
432
|
+
background-position: center;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
437
|
+
.c6 {
|
|
438
|
+
visibility: hidden;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
414
442
|
@media (min-width:740px) {
|
|
415
443
|
.c2 {
|
|
416
444
|
-webkit-flex-direction: row;
|
|
@@ -189,6 +189,12 @@ exports[`renders correctly with no body 1`] = `
|
|
|
189
189
|
height: auto;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
+
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
193
|
+
.c3 {
|
|
194
|
+
visibility: hidden;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
192
198
|
@media (min-width:0px) {
|
|
193
199
|
.c0 {
|
|
194
200
|
-webkit-flex-direction: column;
|
|
@@ -119,6 +119,20 @@ exports[`renders Column view correctly 1`] = `
|
|
|
119
119
|
z-index: 2;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
123
|
+
.c3 {
|
|
124
|
+
background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
125
|
+
background-size: cover;
|
|
126
|
+
background-position: center;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
131
|
+
.c4 {
|
|
132
|
+
visibility: hidden;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
122
136
|
@media (min-width:740px) {
|
|
123
137
|
.c8 {
|
|
124
138
|
width: auto;
|
|
@@ -377,6 +391,20 @@ exports[`renders correctly 1`] = `
|
|
|
377
391
|
z-index: 2;
|
|
378
392
|
}
|
|
379
393
|
|
|
394
|
+
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
395
|
+
.c3 {
|
|
396
|
+
background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
397
|
+
background-size: cover;
|
|
398
|
+
background-position: center;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
403
|
+
.c4 {
|
|
404
|
+
visibility: hidden;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
380
408
|
@media (min-width:740px) {
|
|
381
409
|
.c8 {
|
|
382
410
|
width: auto;
|
|
@@ -116,6 +116,14 @@ it('renders correctly', () => {
|
|
|
116
116
|
background-color: #E52630;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
120
|
+
.c2 {
|
|
121
|
+
background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
122
|
+
background-size: cover;
|
|
123
|
+
background-position: center;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
119
127
|
@media (min-width:740px) {
|
|
120
128
|
.c6 {
|
|
121
129
|
font-size: 1rem;
|
|
@@ -153,6 +153,20 @@ exports[`renders Promo correctly 1`] = `
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
+
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
157
|
+
.c2 {
|
|
158
|
+
background-image: url(../promo.jpg);
|
|
159
|
+
background-size: cover;
|
|
160
|
+
background-position: center;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
165
|
+
.c3 {
|
|
166
|
+
visibility: hidden;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
156
170
|
@media (min-width:740px) {
|
|
157
171
|
.c9 {
|
|
158
172
|
width: auto;
|
|
@@ -431,6 +445,20 @@ exports[`renders Promo correctly end position 1`] = `
|
|
|
431
445
|
}
|
|
432
446
|
}
|
|
433
447
|
|
|
448
|
+
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
449
|
+
.c2 {
|
|
450
|
+
background-image: url(../promo.jpg);
|
|
451
|
+
background-size: cover;
|
|
452
|
+
background-position: center;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
457
|
+
.c3 {
|
|
458
|
+
visibility: hidden;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
434
462
|
@media (min-width:740px) {
|
|
435
463
|
.c9 {
|
|
436
464
|
width: auto;
|
|
@@ -97,6 +97,12 @@ exports[`renders correctly in minimalist form 1`] = `
|
|
|
97
97
|
margin: 0;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
101
|
+
.c5 {
|
|
102
|
+
visibility: hidden;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
100
106
|
@media (min-width:740px) {
|
|
101
107
|
.c2 {
|
|
102
108
|
-webkit-flex-direction: row;
|
|
@@ -279,6 +285,12 @@ exports[`renders correctly with copy 1`] = `
|
|
|
279
285
|
}
|
|
280
286
|
}
|
|
281
287
|
|
|
288
|
+
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
289
|
+
.c5 {
|
|
290
|
+
visibility: hidden;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
282
294
|
@media (min-width:740px) {
|
|
283
295
|
.c2 {
|
|
284
296
|
-webkit-flex-direction: row;
|
|
@@ -452,6 +464,12 @@ exports[`renders correctly with date 1`] = `
|
|
|
452
464
|
margin: 0;
|
|
453
465
|
}
|
|
454
466
|
|
|
467
|
+
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
468
|
+
.c5 {
|
|
469
|
+
visibility: hidden;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
455
473
|
@media (min-width:740px) {
|
|
456
474
|
.c2 {
|
|
457
475
|
-webkit-flex-direction: row;
|
|
@@ -619,6 +637,12 @@ exports[`renders correctly with date and type 1`] = `
|
|
|
619
637
|
margin: 0;
|
|
620
638
|
}
|
|
621
639
|
|
|
640
|
+
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
641
|
+
.c5 {
|
|
642
|
+
visibility: hidden;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
|
|
622
646
|
@media (min-width:740px) {
|
|
623
647
|
.c2 {
|
|
624
648
|
-webkit-flex-direction: row;
|
|
@@ -65,6 +65,20 @@ exports[`renders Single Message with 100% vertical height image correctly 1`] =
|
|
|
65
65
|
z-index: 1;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
69
|
+
.c3 {
|
|
70
|
+
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
71
|
+
background-size: cover;
|
|
72
|
+
background-position: center;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
77
|
+
.c4 {
|
|
78
|
+
visibility: hidden;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
68
82
|
@media (min-width:740px) {
|
|
69
83
|
.c0 {
|
|
70
84
|
-webkit-flex-direction: row;
|
|
@@ -278,6 +292,20 @@ exports[`renders Single Message with Image correctly 1`] = `
|
|
|
278
292
|
z-index: 1;
|
|
279
293
|
}
|
|
280
294
|
|
|
295
|
+
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
296
|
+
.c3 {
|
|
297
|
+
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
298
|
+
background-size: cover;
|
|
299
|
+
background-position: center;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
304
|
+
.c4 {
|
|
305
|
+
visibility: hidden;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
281
309
|
@media (min-width:740px) {
|
|
282
310
|
.c8 {
|
|
283
311
|
width: auto;
|
|
@@ -482,6 +510,20 @@ exports[`renders Single Message with double image correctly 1`] = `
|
|
|
482
510
|
z-index: 1;
|
|
483
511
|
}
|
|
484
512
|
|
|
513
|
+
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
514
|
+
.c3 {
|
|
515
|
+
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
516
|
+
background-size: cover;
|
|
517
|
+
background-position: center;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
522
|
+
.c4 {
|
|
523
|
+
visibility: hidden;
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
485
527
|
@media (min-width:740px) {
|
|
486
528
|
.c0 {
|
|
487
529
|
-webkit-flex-direction: row;
|
|
@@ -736,6 +778,20 @@ exports[`renders Single Message with full width correctly 1`] = `
|
|
|
736
778
|
z-index: 1;
|
|
737
779
|
}
|
|
738
780
|
|
|
781
|
+
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
782
|
+
.c3 {
|
|
783
|
+
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
784
|
+
background-size: cover;
|
|
785
|
+
background-position: center;
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
790
|
+
.c4 {
|
|
791
|
+
visibility: hidden;
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
|
|
739
795
|
@media (min-width:740px) {
|
|
740
796
|
.c8 {
|
|
741
797
|
width: auto;
|
|
@@ -940,6 +996,20 @@ exports[`renders Single Message with full width image and no text correctly 1`]
|
|
|
940
996
|
z-index: 1;
|
|
941
997
|
}
|
|
942
998
|
|
|
999
|
+
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
1000
|
+
.c3 {
|
|
1001
|
+
background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
1002
|
+
background-size: cover;
|
|
1003
|
+
background-position: center;
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
1008
|
+
.c4 {
|
|
1009
|
+
visibility: hidden;
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
|
|
943
1013
|
@media (min-width:740px) {
|
|
944
1014
|
|
|
945
1015
|
}
|
|
@@ -1066,6 +1136,14 @@ exports[`renders Single Message with no Image correctly 1`] = `
|
|
|
1066
1136
|
padding: 1rem;
|
|
1067
1137
|
}
|
|
1068
1138
|
|
|
1139
|
+
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
1140
|
+
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
1144
|
+
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1069
1147
|
@media (min-width:740px) {
|
|
1070
1148
|
|
|
1071
1149
|
}
|
|
@@ -153,6 +153,20 @@ exports[`renders correctly 1`] = `
|
|
|
153
153
|
right: 1.5rem;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
+
@supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
|
|
157
|
+
.c3 {
|
|
158
|
+
background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
|
|
159
|
+
background-size: cover;
|
|
160
|
+
background-position: center;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@supports not ((object-fit:cover) or (object-fit:contain)) {
|
|
165
|
+
.c4 {
|
|
166
|
+
visibility: hidden;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
156
170
|
@media (min-width:740px) {
|
|
157
171
|
.c12 {
|
|
158
172
|
width: auto;
|
|
@@ -119,7 +119,7 @@ const Donate = ({
|
|
|
119
119
|
{/* Only render if there is SOME title copy; otherwise,
|
|
120
120
|
we need to the space to centre-align the form */}
|
|
121
121
|
{ !noTitlesAtAll && (
|
|
122
|
-
<TitleWrapperOuter formAlignRight={formAlignRight}
|
|
122
|
+
<TitleWrapperOuter formAlignRight={formAlignRight}>
|
|
123
123
|
<TitleWrapperInner>
|
|
124
124
|
{showCopy && (
|
|
125
125
|
<>
|
|
@@ -27,7 +27,7 @@ const GivingSelector = ({
|
|
|
27
27
|
type="radio"
|
|
28
28
|
label=""
|
|
29
29
|
checked={givingType === 'single'}
|
|
30
|
-
|
|
30
|
+
onChange={() => handleGivingTypeChange('single', givingType)}
|
|
31
31
|
/>
|
|
32
32
|
<Label active={givingType === 'single'} htmlFor={`give-once--${mbshipID}`}>
|
|
33
33
|
Single
|
|
@@ -40,7 +40,7 @@ const GivingSelector = ({
|
|
|
40
40
|
type="radio"
|
|
41
41
|
label=""
|
|
42
42
|
checked={givingType === 'monthly'}
|
|
43
|
-
|
|
43
|
+
onChange={() => handleGivingTypeChange('monthly', givingType)}
|
|
44
44
|
/>
|
|
45
45
|
<Label active={givingType === 'monthly'} htmlFor={`give-monthly--${mbshipID}`}>
|
|
46
46
|
Monthly
|