Un accord d’entreprise, le contrat de travail ou un usage peuvent prévoir un montant plus favorable pour le salarié. Dans ce cas, le montant dû est le montant le plus favorable pour le salarié.
diff --git a/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/__tests__/__snapshots__/Primes.test.js.snap b/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/__tests__/__snapshots__/Primes.test.js.snap
index 4f894c65d6..0c000178fa 100644
--- a/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/__tests__/__snapshots__/Primes.test.js.snap
+++ b/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/__tests__/__snapshots__/Primes.test.js.snap
@@ -95,6 +95,7 @@ exports[`
should render 1`] = `
font-weight: 600;
font-size: 1.6rem;
line-height: 1.625;
+ vertical-align: baseline;
text-align: left;
background: none;
border: none;
diff --git a/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/__tests__/__snapshots__/Salaires.test.js.snap b/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/__tests__/__snapshots__/Salaires.test.js.snap
index f1bd40c21b..d26a8f9ca8 100644
--- a/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/__tests__/__snapshots__/Salaires.test.js.snap
+++ b/packages/code-du-travail-frontend/src/outils/IndemniteLicenciement/steps/__tests__/__snapshots__/Salaires.test.js.snap
@@ -1282,6 +1282,7 @@ exports[`
should render tempsPartiel 1`] = `
font-weight: 600;
font-size: 1.6rem;
line-height: 1.625;
+ vertical-align: baseline;
text-align: left;
background: none;
border: none;
diff --git a/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/__tests__/__snapshots__/index.test.js.snap b/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/__tests__/__snapshots__/index.test.js.snap
index 198e04bc5c..7b8fad1c61 100644
--- a/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/__tests__/__snapshots__/index.test.js.snap
+++ b/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/__tests__/__snapshots__/index.test.js.snap
@@ -73,6 +73,7 @@ exports[`
should render 1`] = `
color: #3e486e;
border-radius: 0.6rem;
background-color: #f2f5fa;
+ border: 1px solid #f2f5fa;
position: absolute;
top: 0;
bottom: 0;
diff --git a/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/components/__tests__/__snapshots__/Salaires.test.js.snap b/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/components/__tests__/__snapshots__/Salaires.test.js.snap
index e9e6ba640d..6742f80c47 100644
--- a/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/components/__tests__/__snapshots__/Salaires.test.js.snap
+++ b/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/components/__tests__/__snapshots__/Salaires.test.js.snap
@@ -95,6 +95,7 @@ exports[`
should add a salaire 1`] = `
font-weight: 600;
font-size: 1.6rem;
line-height: 1.625;
+ vertical-align: baseline;
text-align: left;
background: none;
border: none;
@@ -409,6 +410,7 @@ exports[`
should delete a salaires 1`] = `
font-weight: 600;
font-size: 1.6rem;
line-height: 1.625;
+ vertical-align: baseline;
text-align: left;
background: none;
border: none;
@@ -566,6 +568,7 @@ exports[`
should render 1`] = `
font-weight: 600;
font-size: 1.6rem;
line-height: 1.625;
+ vertical-align: baseline;
text-align: left;
background: none;
border: none;
diff --git a/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/steps/__tests__/__snapshots__/Remuneration.test.js.snap b/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/steps/__tests__/__snapshots__/Remuneration.test.js.snap
index 7b6f290ad3..94195bb31f 100644
--- a/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/steps/__tests__/__snapshots__/Remuneration.test.js.snap
+++ b/packages/code-du-travail-frontend/src/outils/IndemnitePrecarite/steps/__tests__/__snapshots__/Remuneration.test.js.snap
@@ -95,6 +95,7 @@ exports[`
should render multiple inputs 1`] = `
font-weight: 600;
font-size: 1.6rem;
line-height: 1.625;
+ vertical-align: baseline;
text-align: left;
background: none;
border: none;
diff --git a/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/InfoCCn.test.js.snap b/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/InfoCCn.test.js.snap
index e777ad8627..196780a9cb 100644
--- a/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/InfoCCn.test.js.snap
+++ b/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/InfoCCn.test.js.snap
@@ -2,25 +2,11 @@
exports[`
should render cdd infos step 1`] = `
.c2 {
- max-width: 124rem;
- margin: 0 auto;
- padding: 0 2rem;
-}
-
-.c2 > *:first-child {
- margin-top: 0;
-}
-
-.c2 > *:last-child {
- margin-bottom: 0;
-}
-
-.c4 {
position: relative;
display: inline-block;
}
-.c6 {
+.c4 {
width: 100%;
height: 5.4rem;
padding: 0 2rem;
@@ -42,15 +28,15 @@ exports[`
should render cdd infos step 1`] = `
appearance: none;
}
-.c6::-webkit-outer-spin-button,
-.c6::-webkit-inner-spin-button {
+.c4::-webkit-outer-spin-button,
+.c4::-webkit-inner-spin-button {
margin: 0;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
-.c6::-webkit-calendar-picker-indicator {
+.c4::-webkit-calendar-picker-indicator {
display: block;
width: 3.2rem;
height: 3.2rem;
@@ -63,47 +49,47 @@ exports[`
should render cdd infos step 1`] = `
mask-image: url("data:image/svg+xml;,%3Csvg%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M20.947%207.601h1.601c1.472%200%202.521%201.198%202.521%202.669v2.306l-.001%2010.392c0%201.472-1.049%202.669-2.521%202.669H8.669A2.672%202.672%200%20016%2022.967l.001-12.697a2.672%202.672%200%20012.67-2.669h1.331V6h.999v1.601H20V6h.947v1.601zm1.6%2017.036c.883%200%201.454-.786%201.454-1.67v-10.33h-17L7%2022.967c0%20.884.785%201.67%201.668%201.67h13.879zm-15.548-13h17.002l.001-1.367c0-.883-.57-1.601-1.453-1.601h-1.6v1.068H20V8.669h-9v1.068h-1V8.669H8.669C7.786%208.669%207%209.387%207%2010.27v1.367zm9.677%206.277h-2.135a1.07%201.07%200%2001-1.068-1.068v-2.135a1.07%201.07%200%20011.068-1.068h2.135a1.07%201.07%200%20011.068%201.068v2.135a1.07%201.07%200%2001-1.068%201.068zm0-3.203h-2.135v2.135h2.136v-2.135zm3.203%203.203h2.135a1.07%201.07%200%20001.068-1.068v-2.135a1.07%201.07%200%2000-1.068-1.068H19.88a1.07%201.07%200%2000-1.068%201.068v2.135a1.07%201.07%200%20001.068%201.068zm0-3.203h2.135l.001%202.135H19.88v-2.135zm-8.54%208.541H9.204a1.07%201.07%200%2001-1.068-1.068v-2.135a1.07%201.07%200%20011.068-1.068h2.135a1.07%201.07%200%20011.068%201.068v2.135a1.07%201.07%200%2001-1.068%201.068zm0-3.203H9.204v2.135h2.136l-.001-2.135zm3.202%203.203h2.135a1.07%201.07%200%20001.068-1.068v-2.135a1.07%201.07%200%2000-1.068-1.068h-2.135a1.07%201.07%200%2000-1.068%201.068v2.135a1.07%201.07%200%20001.068%201.068zm0-3.203h2.135l.001%202.135h-2.136v-2.135zm7.473%203.203H19.88a1.07%201.07%200%2001-1.068-1.068v-2.135a1.07%201.07%200%20011.068-1.068h2.135a1.07%201.07%200%20011.068%201.068v2.135a1.07%201.07%200%2001-1.068%201.068zm0-3.203H19.88v2.135h2.136v-2.135z%22%20fill%3D%22currentColor%22%2F%3E%3C%2Fsvg%3E");
}
-.c6:invalid {
+.c4:invalid {
border-color: #eb5757;
}
-.c6::-webkit-input-placeholder {
+.c4::-webkit-input-placeholder {
color: #9298af;
}
-.c6::-moz-placeholder {
+.c4::-moz-placeholder {
color: #9298af;
}
-.c6:-ms-input-placeholder {
+.c4:-ms-input-placeholder {
color: #9298af;
}
-.c6::placeholder {
+.c4::placeholder {
color: #9298af;
}
-.c6:focus {
+.c4:focus {
border-color: #7994d4;
}
-.c6:focus::-webkit-input-placeholder {
+.c4:focus::-webkit-input-placeholder {
color: transparent;
}
-.c6:focus::-moz-placeholder {
+.c4:focus::-moz-placeholder {
color: transparent;
}
-.c6:focus:-ms-input-placeholder {
+.c4:focus:-ms-input-placeholder {
color: transparent;
}
-.c6:focus::placeholder {
+.c4:focus::placeholder {
color: transparent;
}
-.c5 {
+.c3 {
display: block;
}
@@ -115,30 +101,12 @@ exports[`
should render cdd infos step 1`] = `
cursor: default;
}
-.c3 {
- padding-right: 0;
- padding-left: 0;
-}
-
.c1 {
font-style: italic;
}
@media (max-width:600px) {
- .c2 {
- padding: 0 1rem;
- }
-}
-
-@media print {
- .c2 {
- max-width: 100%;
- padding: 0;
- }
-}
-
-@media (max-width:600px) {
- .c6 {
+ .c4 {
padding: 0 1rem;
padding-right: 2rem;
}
@@ -164,26 +132,22 @@ exports[`
should render cdd infos step 1`] = `
, si vous ne connaissez pas la convention collective, vous pouvez passer à l’étape suivante en cliquant sur le bouton Suivant.
-
+
+
+
`;
diff --git a/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/StepList.test.js.snap b/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/StepList.test.js.snap
index 2f884e894a..5edfd94bb9 100644
--- a/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/StepList.test.js.snap
+++ b/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/StepList.test.js.snap
@@ -12,6 +12,7 @@ exports[`
should render 1`] = `
color: #3e486e;
border-radius: 0.6rem;
background-color: #f2f5fa;
+ border: 1px solid #f2f5fa;
position: absolute;
top: 0;
bottom: 0;
diff --git a/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/Wizard.test.js.snap b/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/Wizard.test.js.snap
index 4d9c791f25..77fbc7d19f 100644
--- a/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/Wizard.test.js.snap
+++ b/packages/code-du-travail-frontend/src/outils/common/__tests__/__snapshots__/Wizard.test.js.snap
@@ -73,6 +73,7 @@ exports[`
should call navigate the previous step when click on précé
color: #3e486e;
border-radius: 0.6rem;
background-color: #f2f5fa;
+ border: 1px solid #f2f5fa;
position: absolute;
top: 0;
bottom: 0;
@@ -587,6 +588,7 @@ exports[`
should handle initialStepIndex 1`] = `
color: #3e486e;
border-radius: 0.6rem;
background-color: #f2f5fa;
+ border: 1px solid #f2f5fa;
position: absolute;
top: 0;
bottom: 0;
@@ -1061,6 +1063,7 @@ exports[`
should handle initialValues 1`] = `
color: #3e486e;
border-radius: 0.6rem;
background-color: #f2f5fa;
+ border: 1px solid #f2f5fa;
position: absolute;
top: 0;
bottom: 0;
@@ -1524,6 +1527,7 @@ exports[`
should inject rules component 1`] = `
color: #3e486e;
border-radius: 0.6rem;
background-color: #f2f5fa;
+ border: 1px solid #f2f5fa;
position: absolute;
top: 0;
bottom: 0;
@@ -2041,6 +2045,7 @@ exports[`
should navigate to the second step when click on Suivant 1`]
color: #3e486e;
border-radius: 0.6rem;
background-color: #f2f5fa;
+ border: 1px solid #f2f5fa;
position: absolute;
top: 0;
bottom: 0;
@@ -2515,6 +2520,7 @@ exports[`
should render a step 1`] = `
color: #3e486e;
border-radius: 0.6rem;
background-color: #f2f5fa;
+ border: 1px solid #f2f5fa;
position: absolute;
top: 0;
bottom: 0;
diff --git a/packages/code-du-travail-frontend/src/outils/common/stepStyles.js b/packages/code-du-travail-frontend/src/outils/common/stepStyles.js
index b564e7d5a1..e6162567f7 100644
--- a/packages/code-du-travail-frontend/src/outils/common/stepStyles.js
+++ b/packages/code-du-travail-frontend/src/outils/common/stepStyles.js
@@ -1,5 +1,5 @@
import styled from "styled-components";
-import { theme, Title } from "@socialgouv/react-ui";
+import { theme } from "@socialgouv/react-ui";
const { breakpoints, fonts, colors, spacings } = theme;
@@ -35,9 +35,13 @@ export const Header = styled.div`
align-items: center;
`;
-export const SectionTitle = styled(Title)`
+export const SectionTitle = styled.h2`
margin-top: ${spacings.large};
margin-bottom: ${spacings.medium};
+ color: ${({ theme }) => theme.altText};
+ font-weight: 600;
+ font-size: ${fonts.sizes.headings.small};
+ font-family: "Open Sans", sans-serif;
`;
export const Highlight = styled.strong`
diff --git a/packages/code-du-travail-frontend/src/search/__tests__/__snapshots__/SearchResults.test.js.snap b/packages/code-du-travail-frontend/src/search/__tests__/__snapshots__/SearchResults.test.js.snap
index cb30a23d37..6fa5ac96a9 100644
--- a/packages/code-du-travail-frontend/src/search/__tests__/__snapshots__/SearchResults.test.js.snap
+++ b/packages/code-du-travail-frontend/src/search/__tests__/__snapshots__/SearchResults.test.js.snap
@@ -157,6 +157,7 @@ exports[`
should render results 1`] = `
font-weight: 600;
font-size: 1.6rem;
line-height: 1.625;
+ vertical-align: baseline;
text-align: left;
background: none;
border: none;
@@ -421,7 +422,8 @@ exports[`
should render results 1`] = `
}
.c1 {
- margin: 0 auto 1rem;
+ margin-bottom: 1.6rem;
+ margin-left: auto;
text-align: left;
}
@@ -623,6 +625,13 @@ exports[`
should render results 1`] = `
}
}
+@media (max-width:600px) {
+ .c1 {
+ margin-bottom: 1rem;
+ margin-left: auto;
+ }
+}
+
@media (max-width:600px) {
.c2 {
padding-left: 1.6rem;
diff --git a/packages/react-fiche-service-public/__tests__/__snapshots__/FicheServicePublic.test.js.snap b/packages/react-fiche-service-public/__tests__/__snapshots__/FicheServicePublic.test.js.snap
index b1adaf5884..02479d23b8 100644
--- a/packages/react-fiche-service-public/__tests__/__snapshots__/FicheServicePublic.test.js.snap
+++ b/packages/react-fiche-service-public/__tests__/__snapshots__/FicheServicePublic.test.js.snap
@@ -236,7 +236,8 @@ exports[`
should render 1`] = `
}
.c7 {
- margin: 0 auto 1rem;
+ margin-bottom: 1.6rem;
+ margin-left: auto;
text-align: left;
}
@@ -387,6 +388,13 @@ exports[`
should render 1`] = `
}
}
+@media (max-width:600px) {
+ .c7 {
+ margin-bottom: 1rem;
+ margin-left: auto;
+ }
+}
+
@media (max-width:600px) {
.c8 {
padding-left: 1.6rem;
diff --git a/packages/react-fiche-service-public/src/components/__tests__/__snapshots__/Accordion.test.js.snap b/packages/react-fiche-service-public/src/components/__tests__/__snapshots__/Accordion.test.js.snap
index 64d7750fc7..d7c70438be 100644
--- a/packages/react-fiche-service-public/src/components/__tests__/__snapshots__/Accordion.test.js.snap
+++ b/packages/react-fiche-service-public/src/components/__tests__/__snapshots__/Accordion.test.js.snap
@@ -88,7 +88,8 @@ exports[`
should have two different levels of headings 1`] = `
}
.c0 {
- margin: 0 auto 1rem;
+ margin-bottom: 1.6rem;
+ margin-left: auto;
text-align: left;
}
@@ -114,6 +115,13 @@ exports[`
should have two different levels of headings 1`] = `
}
}
+@media (max-width:600px) {
+ .c0 {
+ margin-bottom: 1rem;
+ margin-left: auto;
+ }
+}
+
@media (max-width:600px) {
.c1 {
padding-left: 1.6rem;
diff --git a/packages/react-fiche-service-public/src/components/__tests__/__snapshots__/List.test.js.snap b/packages/react-fiche-service-public/src/components/__tests__/__snapshots__/List.test.js.snap
index 79b8d04db1..c88ba2703f 100644
--- a/packages/react-fiche-service-public/src/components/__tests__/__snapshots__/List.test.js.snap
+++ b/packages/react-fiche-service-public/src/components/__tests__/__snapshots__/List.test.js.snap
@@ -15,7 +15,8 @@ exports[`
should render and increment heading level of children by one 1
}
.c1 {
- margin: 0 auto 1rem;
+ margin-bottom: 1.6rem;
+ margin-left: auto;
text-align: left;
}
@@ -35,6 +36,13 @@ exports[`
should render and increment heading level of children by one 1
margin-bottom: 0.4rem;
}
+@media (max-width:600px) {
+ .c1 {
+ margin-bottom: 1rem;
+ margin-left: auto;
+ }
+}
+
@media (max-width:600px) {
.c2 {
padding-left: 1.6rem;
diff --git a/packages/react-fiche-service-public/src/components/__tests__/__snapshots__/Tabulator.test.js.snap b/packages/react-fiche-service-public/src/components/__tests__/__snapshots__/Tabulator.test.js.snap
index 75fd8976a0..5f59cbf4fd 100644
--- a/packages/react-fiche-service-public/src/components/__tests__/__snapshots__/Tabulator.test.js.snap
+++ b/packages/react-fiche-service-public/src/components/__tests__/__snapshots__/Tabulator.test.js.snap
@@ -92,7 +92,8 @@ exports[`
should have two different levels of headings 1`] = `
}
.c5 {
- margin: 0 auto 1rem;
+ margin-bottom: 1.6rem;
+ margin-left: auto;
text-align: left;
}
@@ -151,6 +152,13 @@ exports[`
should have two different levels of headings 1`] = `
}
}
+@media (max-width:600px) {
+ .c5 {
+ margin-bottom: 1rem;
+ margin-left: auto;
+ }
+}
+
@media (max-width:600px) {
.c6 {
padding-left: 1.6rem;
diff --git a/packages/react-ui/src/Alert/__snapshots__/test.js.snap b/packages/react-ui/src/Alert/__snapshots__/test.js.snap
index 9a93f3d92b..464e987a64 100644
--- a/packages/react-ui/src/Alert/__snapshots__/test.js.snap
+++ b/packages/react-ui/src/Alert/__snapshots__/test.js.snap
@@ -6,8 +6,7 @@ exports[`
it should render a primary alert 1`] = `
padding: 1rem 2rem;
color: #3e486e;
background-color: #f2f5fa;
- border: 1px solid transparent;
- border-color: #f66663;
+ border: 1px solid #f66663;
border-radius: 0.6rem;
}
@@ -36,7 +35,7 @@ exports[`
it should render a secondary alert 1`] = `
padding: 1rem 2rem;
color: #3e486e;
background-color: #f2f5fa;
- border: 1px solid transparent;
+ border: 1px solid #f2f5fa;
border-radius: 0.6rem;
}
@@ -65,7 +64,7 @@ exports[`
should render 1`] = `
padding: 1rem 2rem;
color: #3e486e;
background-color: #f2f5fa;
- border: 1px solid transparent;
+ border: 1px solid #f2f5fa;
border-radius: 0.6rem;
}
diff --git a/packages/react-ui/src/Alert/index.js b/packages/react-ui/src/Alert/index.js
index 1851b0dc7d..696d808e0d 100644
--- a/packages/react-ui/src/Alert/index.js
+++ b/packages/react-ui/src/Alert/index.js
@@ -1,5 +1,5 @@
import PropTypes from "prop-types";
-import styled, { css } from "styled-components";
+import styled from "styled-components";
import { box, spacings } from "../theme";
export const Alert = styled.div`
@@ -7,14 +7,9 @@ export const Alert = styled.div`
padding: ${spacings.small} ${spacings.medium};
color: ${({ theme }) => theme.paragraph};
background-color: ${({ theme }) => theme.bgSecondary};
- border: 1px solid transparent;
- ${props => {
- if (props.variant === "primary") {
- return css`
- border-color: ${({ theme }) => theme.primary};
- `;
- }
- }}
+ border: 1px solid
+ ${({ theme, variant }) =>
+ variant === "primary" ? theme.primary : theme.bgSecondary};
border-radius: ${box.borderRadius};
& > *:first-child {
margin-top: 0;
diff --git a/packages/react-ui/src/Button/__snapshots__/test.js.snap b/packages/react-ui/src/Button/__snapshots__/test.js.snap
index 622506a6df..1859488819 100644
--- a/packages/react-ui/src/Button/__snapshots__/test.js.snap
+++ b/packages/react-ui/src/Button/__snapshots__/test.js.snap
@@ -267,6 +267,7 @@ exports[`
it renders a Button link 1`] = `
font-weight: 600;
font-size: 1.6rem;
line-height: 1.625;
+ vertical-align: baseline;
text-align: left;
background: none;
border: none;
diff --git a/packages/react-ui/src/Button/index.js b/packages/react-ui/src/Button/index.js
index cf9a24a6de..85209610e0 100644
--- a/packages/react-ui/src/Button/index.js
+++ b/packages/react-ui/src/Button/index.js
@@ -33,6 +33,7 @@ export const StyledButton = styled.button`
font-weight: 600;
font-size: ${fonts.sizes.default};
line-height: ${fonts.lineHeight};
+ vertical-align: baseline;
text-align: left;
background: none;
border: none;
diff --git a/packages/react-ui/src/IconStripe/__snapshots__/test.js.snap b/packages/react-ui/src/IconStripe/__snapshots__/test.js.snap
new file mode 100644
index 0000000000..b0ae4347be
--- /dev/null
+++ b/packages/react-ui/src/IconStripe/__snapshots__/test.js.snap
@@ -0,0 +1,68 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`
renders 1`] = `
+.c0 {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-pack: stretch;
+ -webkit-justify-content: stretch;
+ -ms-flex-pack: stretch;
+ justify-content: stretch;
+}
+
+.c1 {
+ display: block;
+ -webkit-flex: 0 0 4.2rem;
+ -ms-flex: 0 0 4.2rem;
+ flex: 0 0 4.2rem;
+ margin-right: 2.4rem;
+}
+
+.c2 {
+ -webkit-flex: 1 1 auto;
+ -ms-flex: 1 1 auto;
+ flex: 1 1 auto;
+}
+
+@media (max-width:600px) {
+ .c1 {
+ -webkit-flex: 0 0 3.4rem;
+ -ms-flex: 0 0 3.4rem;
+ flex: 0 0 3.4rem;
+ margin-right: 1rem;
+ }
+}
+
+
+
+
+
+ Here is some content
+
+
+
+`;
diff --git a/packages/react-ui/src/IconStripe/index.js b/packages/react-ui/src/IconStripe/index.js
new file mode 100644
index 0000000000..c000f4bfa4
--- /dev/null
+++ b/packages/react-ui/src/IconStripe/index.js
@@ -0,0 +1,38 @@
+import React from "react";
+import PropTypes from "prop-types";
+import styled from "styled-components";
+
+import { breakpoints, spacings } from "../theme";
+
+export const IconStripe = ({ children, icon: Icon, ...props }) => (
+
+
+
+
+ {children}
+
+);
+
+const FlexDiv = styled.div`
+ display: flex;
+ justify-content: stretch;
+`;
+
+const IconWrapper = styled.div`
+ display: ${({ theme }) => (theme.noColors ? "none" : "block")};
+ flex: 0 0 4.2rem;
+ margin-right: ${spacings.xmedium};
+ @media (max-width: ${breakpoints.mobile}) {
+ flex: 0 0 3.4rem;
+ margin-right: ${spacings.small};
+ }
+`;
+
+const ChildrenWrapper = styled.div`
+ flex: 1 1 auto;
+`;
+
+IconStripe.propTypes = {
+ children: PropTypes.node.isRequired,
+ icon: PropTypes.elementType.isRequired
+};
diff --git a/packages/react-ui/src/IconStripe/story.js b/packages/react-ui/src/IconStripe/story.js
new file mode 100644
index 0000000000..d36b58ad3e
--- /dev/null
+++ b/packages/react-ui/src/IconStripe/story.js
@@ -0,0 +1,25 @@
+import React from "react";
+import { Custom, Document } from "../icons";
+import { Section } from "../layout/Section";
+import { IconStripe } from ".";
+
+export default {
+ component: IconStripe,
+ title: "Components|IconStripe"
+};
+
+export const base = () => (
+ <>
+
+
+ This is a very basic component that simply puts an icon on the left of
+ the children
+
+
+
+
+ Check how it fits with another icon
+
+
+ >
+);
diff --git a/packages/react-ui/src/IconStripe/test.js b/packages/react-ui/src/IconStripe/test.js
new file mode 100644
index 0000000000..5b91213852
--- /dev/null
+++ b/packages/react-ui/src/IconStripe/test.js
@@ -0,0 +1,13 @@
+import React from "react";
+import { render } from "@testing-library/react";
+import { Document } from "../icons";
+import { IconStripe } from ".";
+
+describe("
", () => {
+ it("renders", () => {
+ const { container } = render(
+
Here is some content
+ );
+ expect(container).toMatchSnapshot();
+ });
+});
diff --git a/packages/react-ui/src/Titles/Heading/__snapshots__/test.js.snap b/packages/react-ui/src/Titles/Heading/__snapshots__/test.js.snap
index ddd280a456..9d0f173196 100644
--- a/packages/react-ui/src/Titles/Heading/__snapshots__/test.js.snap
+++ b/packages/react-ui/src/Titles/Heading/__snapshots__/test.js.snap
@@ -29,8 +29,8 @@ exports[`
renders a H3 heading 1`] = `
exports[`
renders a stripped shifted H4 heading 1`] = `
.c1 {
position: absolute;
- background-color: #f66663;
- border-radius: none;
+ background-color: #7994d4;
+ border-radius: 0.6rem;
top: 50%;
left: 0;
width: 0.4rem;
diff --git a/packages/react-ui/src/Titles/Heading/index.js b/packages/react-ui/src/Titles/Heading/index.js
index d678f46c55..70fb77227a 100644
--- a/packages/react-ui/src/Titles/Heading/index.js
+++ b/packages/react-ui/src/Titles/Heading/index.js
@@ -4,9 +4,16 @@ import styled, { css } from "styled-components";
import { Stripe } from "../../Stripe";
import { breakpoints, fonts, spacings } from "../../theme";
-export const Heading = ({ children, stripped = false, ...props }) => (
+export const Heading = ({ children, stripped = false, variant, ...props }) => (
- {stripped && }
+ {stripped && (
+
+ )}
{children}
);
@@ -15,7 +22,12 @@ Heading.propTypes = {
as: PropTypes.string,
children: PropTypes.node,
shift: PropTypes.string,
- stripped: PropTypes.bool
+ stripped: PropTypes.bool,
+ variant: PropTypes.string
+};
+
+Heading.defaultProps = {
+ variant: "secondary"
};
const StyledHeading = styled.h3`
diff --git a/packages/react-ui/src/Titles/Heading/story.js b/packages/react-ui/src/Titles/Heading/story.js
index aa737ff27c..c541223611 100644
--- a/packages/react-ui/src/Titles/Heading/story.js
+++ b/packages/react-ui/src/Titles/Heading/story.js
@@ -14,10 +14,19 @@ export const base = () => (
<>
+
- This is a stripped heading (h3)
+ This is a stripped heading
+
+
+
+ This is a stripped primary heading
+
+
+
This is a stripped shifted heading (h4)
diff --git a/packages/react-ui/src/Titles/PageTitle/__snapshots__/test.js.snap b/packages/react-ui/src/Titles/PageTitle/__snapshots__/test.js.snap
index 2d9131af7d..8eacb71971 100644
--- a/packages/react-ui/src/Titles/PageTitle/__snapshots__/test.js.snap
+++ b/packages/react-ui/src/Titles/PageTitle/__snapshots__/test.js.snap
@@ -15,8 +15,8 @@ exports[` renders a H1 page title 1`] = `
}
.c0 {
- margin: 0 auto 1rem;
margin-bottom: 4rem;
+ margin-left: auto;
text-align: center;
}
@@ -34,12 +34,13 @@ exports[` renders a H1 page title 1`] = `
@media (max-width:600px) {
.c0 {
margin-bottom: 2.4rem;
+ margin-left: auto;
}
}
@media (max-width:600px) {
.c1 {
- font-size: 2.8rem;
+ font-size: 2.6rem;
}
}
@@ -74,7 +75,8 @@ exports[` renders a leftStripped shifted H1 page title 1`] = `
}
.c0 {
- margin: 0 auto 1rem;
+ margin-bottom: 4rem;
+ margin-left: auto;
text-align: left;
}
@@ -89,6 +91,13 @@ exports[` renders a leftStripped shifted H1 page title 1`] = `
padding-left: 3.2rem;
}
+@media (max-width:600px) {
+ .c0 {
+ margin-bottom: 2.4rem;
+ margin-left: auto;
+ }
+}
+
@media (max-width:600px) {
.c1 {
padding-left: 1.6rem;
@@ -97,7 +106,7 @@ exports[` renders a leftStripped shifted H1 page title 1`] = `
@media (max-width:600px) {
.c1 {
- font-size: 2.8rem;
+ font-size: 2.6rem;
}
}
diff --git a/packages/react-ui/src/Titles/PageTitle/index.js b/packages/react-ui/src/Titles/PageTitle/index.js
index 25b508149a..a0c124bb9a 100644
--- a/packages/react-ui/src/Titles/PageTitle/index.js
+++ b/packages/react-ui/src/Titles/PageTitle/index.js
@@ -13,12 +13,14 @@ export const PageTitle = ({
leftStripped = false,
shift = "",
subtitle,
+ variant,
...props
}) => (
{children}
@@ -36,7 +38,12 @@ PageTitle.propTypes = {
children: PropTypes.node,
shift: PropTypes.string,
leftStripped: PropTypes.bool,
- subtitle: PropTypes.string
+ subtitle: PropTypes.string,
+ variant: PropTypes.string
+};
+
+PageTitle.defaultProps = {
+ variant: "secondary"
};
const StyledPageTitle = styled.h1`
@@ -61,6 +68,6 @@ const StyledPageTitle = styled.h1`
`;
}};
@media (max-width: ${breakpoints.mobile}) {
- font-size: ${fonts.sizes.headings.medium};
+ font-size: ${fonts.sizes.headings.mobileMedium};
}
`;
diff --git a/packages/react-ui/src/Titles/PageTitle/story.js b/packages/react-ui/src/Titles/PageTitle/story.js
index 45ae10ec5f..9d8dc810b3 100644
--- a/packages/react-ui/src/Titles/PageTitle/story.js
+++ b/packages/react-ui/src/Titles/PageTitle/story.js
@@ -11,6 +11,12 @@ export default {
export const base = () => (
<>
+
+ This is a basic page title
+
+
+ This is a primary page title
+
This is a page title
diff --git a/packages/react-ui/src/Titles/Title/__snapshots__/test.js.snap b/packages/react-ui/src/Titles/Title/__snapshots__/test.js.snap
index 75b620d9c1..4165497df9 100644
--- a/packages/react-ui/src/Titles/Title/__snapshots__/test.js.snap
+++ b/packages/react-ui/src/Titles/Title/__snapshots__/test.js.snap
@@ -15,7 +15,8 @@ exports[` renders a H2 title 1`] = `
}
.c0 {
- margin: 0 auto 1rem;
+ margin-bottom: 1.6rem;
+ margin-left: auto;
text-align: left;
}
@@ -31,6 +32,13 @@ exports[` renders a H2 title 1`] = `
text-align: left;
}
+@media (max-width:600px) {
+ .c0 {
+ margin-bottom: 1rem;
+ margin-left: auto;
+ }
+}
+
@media (max-width:600px) {
.c1 {
padding-left: 1.6rem;
@@ -74,7 +82,7 @@ exports[` renders a shifted H2 title (the stripe should be 10rem to the
}
.c0 {
- margin: 0 auto 1rem;
+ margin-bottom: 1.6rem;
margin-left: -10rem;
text-align: left;
}
@@ -93,6 +101,7 @@ exports[` renders a shifted H2 title (the stripe should be 10rem to the
@media (max-width:600px) {
.c0 {
+ margin-bottom: 1rem;
margin-left: -1rem;
}
}
diff --git a/packages/react-ui/src/Titles/Title/index.js b/packages/react-ui/src/Titles/Title/index.js
index 5925fc1eb0..3e3b11dee7 100644
--- a/packages/react-ui/src/Titles/Title/index.js
+++ b/packages/react-ui/src/Titles/Title/index.js
@@ -13,12 +13,14 @@ export const Title = ({
topStripped = false,
shift = "",
subtitle,
+ variant,
...props
}) => (
{children}
@@ -36,7 +38,12 @@ Title.propTypes = {
children: PropTypes.node,
shift: PropTypes.string,
subtitle: PropTypes.string,
- topStripped: PropTypes.bool
+ topStripped: PropTypes.bool,
+ variant: PropTypes.string
+};
+
+Title.defaultProps = {
+ variant: "secondary"
};
const StyledTitle = styled.h2`
diff --git a/packages/react-ui/src/Titles/Title/story.js b/packages/react-ui/src/Titles/Title/story.js
index 005a6ae18e..48ac211787 100644
--- a/packages/react-ui/src/Titles/Title/story.js
+++ b/packages/react-ui/src/Titles/Title/story.js
@@ -11,6 +11,12 @@ export default {
export const base = () => (
<>
+
+ This is a basic title (h2)
+
+
+ This is a basic primary title (h2)
+
This is a title (h2)
diff --git a/packages/react-ui/src/Titles/common/Header.js b/packages/react-ui/src/Titles/common/Header.js
index 9799355f2b..37474e424a 100644
--- a/packages/react-ui/src/Titles/common/Header.js
+++ b/packages/react-ui/src/Titles/common/Header.js
@@ -3,29 +3,14 @@ import styled, { css } from "styled-components";
import { breakpoints, spacings } from "../../theme";
export const Header = styled.header`
- margin: 0 auto ${spacings.small};
- ${({ leftStripped, shift }) => {
- if (leftStripped) {
- if (shift) {
- return css`
- margin-left: -${shift};
- text-align: left;
- @media (max-width: ${breakpoints.mobile}) {
- margin-left: -${spacings.small};
- }
- `;
- }
- return css`
- text-align: left;
- `;
- }
+ ${({ leftStripped, pageTitle, shift }) => {
return css`
- margin-bottom: ${({ pageTitle }) =>
- pageTitle ? spacings.larger : spacings.base};
- text-align: center;
+ margin-bottom: ${pageTitle ? spacings.larger : spacings.base};
+ margin-left: ${shift ? `-${shift}}` : "auto"};
+ text-align: ${leftStripped ? "left" : "center"};
@media (max-width: ${breakpoints.mobile}) {
- margin-bottom: ${({ pageTitle }) =>
- pageTitle ? spacings.xmedium : spacings.small};
+ margin-bottom: ${pageTitle ? spacings.xmedium : spacings.small};
+ margin-left: ${shift ? `-${spacings.small}}` : "auto"};
}
`;
}};
diff --git a/packages/react-ui/src/index.js b/packages/react-ui/src/index.js
index df356be608..f3155ab391 100644
--- a/packages/react-ui/src/index.js
+++ b/packages/react-ui/src/index.js
@@ -16,6 +16,7 @@ export { Button } from "./Button";
export { GlobalStyles } from "./GlobalStyles";
export { Grid, RootGrid, GridCell } from "./Grid";
export { FlatList } from "./FlatList";
+export { IconStripe } from "./IconStripe";
export { Modal, ModalContentWrapper } from "./Modal";
export { OverflowWrapper } from "./OverflowWrapper";
export { ScreenReaderOnly } from "./ScreenReaderOnly";
diff --git a/packages/react-ui/src/layout/Wrapper/__snapshots__/test.js.snap b/packages/react-ui/src/layout/Wrapper/__snapshots__/test.js.snap
index 681185e5bd..6c3e4844a9 100644
--- a/packages/react-ui/src/layout/Wrapper/__snapshots__/test.js.snap
+++ b/packages/react-ui/src/layout/Wrapper/__snapshots__/test.js.snap
@@ -6,6 +6,7 @@ exports[` it renders a dark Wrapper 1`] = `
color: #3e486e;
border-radius: 0.6rem;
background-color: #f2f5fa;
+ border: 1px solid #f2f5fa;
}
.c0 > *:first-child {
diff --git a/packages/react-ui/src/layout/Wrapper/index.js b/packages/react-ui/src/layout/Wrapper/index.js
index 34a8fda8b1..5fc6fb0805 100644
--- a/packages/react-ui/src/layout/Wrapper/index.js
+++ b/packages/react-ui/src/layout/Wrapper/index.js
@@ -22,7 +22,9 @@ export const Wrapper = styled.div`
}
if (props.variant === "dark") {
return css`
- background-color: ${props.theme.bgSecondary};
+ background-color: ${({ theme }) => theme.bgSecondary};
+ border: ${({ theme }) =>
+ box.border(theme.noColors ? theme.border : theme.bgSecondary)};
`;
}
if (props.variant === "main") {
diff --git a/packages/react-ui/src/theme.js b/packages/react-ui/src/theme.js
index 0e4be67eb5..4eb8361354 100644
--- a/packages/react-ui/src/theme.js
+++ b/packages/react-ui/src/theme.js
@@ -75,6 +75,7 @@ export const fonts = {
headings: {
small: "1.8rem",
xmedium: "2.2rem",
+ mobileMedium: "2.6rem",
medium: "2.8rem",
large: "3.2rem"
},