@thecb/components 10.7.0-beta.2 → 10.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "10.7.0-beta.2",
3
+ "version": "10.7.0",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -89,8 +89,6 @@ const ButtonWithAction = forwardRef(
89
89
  variant
90
90
  );
91
91
  const { isMobile } = themeContext;
92
- console.log("button text / theme context is", text, themeContext);
93
- console.log("button text / theme values are", text, themeValues);
94
92
 
95
93
  const hoverStyles = `
96
94
  outline: none;
@@ -3,14 +3,22 @@ import { ThemeContext } from "styled-components";
3
3
  import Heading from "../../atoms/heading";
4
4
  import Paragraph from "../../atoms/paragraph";
5
5
  import { Box, Cluster } from "../../atoms/layouts";
6
- import { GRECIAN_GREY, CHARADE_GREY, WHITE } from "../../../constants/colors";
6
+ import { CHARADE_GREY, WHITE } from "../../../constants/colors";
7
7
  import ButtonWithLink from "../../atoms/button-with-link";
8
8
  import { ForgotPasswordIcon } from "../../atoms/icons";
9
9
  import withWindowSize from "../../withWindowSize";
10
10
  import { FormContainer, FormInputColumn } from "../../atoms/form-layouts";
11
+ import { fallbackValues } from "./ResetConfirmationForm.theme";
12
+ import { createThemeValues } from "../../../util/themeUtils";
11
13
 
12
14
  const ResetConfirmationForm = () => {
13
- const { isMobile } = useContext(ThemeContext);
15
+ const themeContext = useContext(ThemeContext);
16
+ const themeValues = createThemeValues(
17
+ themeContext,
18
+ fallbackValues,
19
+ "ResetConfirmationForm"
20
+ );
21
+ const { isMobile } = themeContext;
14
22
 
15
23
  return (
16
24
  <Box
@@ -20,7 +28,11 @@ const ResetConfirmationForm = () => {
20
28
  background={WHITE}
21
29
  boxShadow="0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)"
22
30
  >
23
- <Box background={GRECIAN_GREY} minWidth="100%" padding="0.5rem">
31
+ <Box
32
+ background={themeValues.bannerBackgroundColor}
33
+ minWidth="100%"
34
+ padding="0.5rem"
35
+ >
24
36
  <Cluster justify="center" align="center">
25
37
  <ForgotPasswordIcon />
26
38
  </Cluster>
@@ -0,0 +1,9 @@
1
+ import { colors } from "../../../constants";
2
+
3
+ const { GRECIAN_GREY } = colors;
4
+
5
+ const bannerBackgroundColor = GRECIAN_GREY;
6
+
7
+ export const fallbackValues = {
8
+ bannerBackgroundColor
9
+ };
@@ -3,14 +3,22 @@ import { ThemeContext } from "styled-components";
3
3
  import Heading from "../../atoms/heading";
4
4
  import Paragraph from "../../atoms/paragraph";
5
5
  import { Box, Cluster } from "../../atoms/layouts";
6
- import { GRECIAN_GREY, CHARADE_GREY, WHITE } from "../../../constants/colors";
6
+ import { CHARADE_GREY, WHITE } from "../../../constants/colors";
7
7
  import ButtonWithLink from "../../atoms/button-with-link";
8
8
  import { ForgotPasswordIcon } from "../../atoms/icons";
9
9
  import withWindowSize from "../../withWindowSize";
10
10
  import { FormContainer, FormInputColumn } from "../../atoms/form-layouts";
11
+ import { fallbackValues } from "./ResetPasswordSuccess.theme";
12
+ import { createThemeValues } from "../../../util/themeUtils";
11
13
 
12
- const ResetConfirmationForm = () => {
13
- const { isMobile } = useContext(ThemeContext);
14
+ const ResetPasswordSuccess = () => {
15
+ const themeContext = useContext(ThemeContext);
16
+ const themeValues = createThemeValues(
17
+ themeContext,
18
+ fallbackValues,
19
+ "ResetPasswordSuccess"
20
+ );
21
+ const { isMobile } = themeContext;
14
22
 
15
23
  return (
16
24
  <Box
@@ -20,7 +28,11 @@ const ResetConfirmationForm = () => {
20
28
  background={WHITE}
21
29
  boxShadow="0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)"
22
30
  >
23
- <Box background={GRECIAN_GREY} minWidth="100%" padding="0.5rem">
31
+ <Box
32
+ background={themeValues.bannerBackgroundColor}
33
+ minWidth="100%"
34
+ padding="0.5rem"
35
+ >
24
36
  <Cluster justify="center" align="center">
25
37
  <ForgotPasswordIcon />
26
38
  </Cluster>
@@ -53,4 +65,4 @@ const ResetConfirmationForm = () => {
53
65
  </Box>
54
66
  );
55
67
  };
56
- export default withWindowSize(ResetConfirmationForm);
68
+ export default withWindowSize(ResetPasswordSuccess);
@@ -0,0 +1,9 @@
1
+ import { colors } from "../../../constants";
2
+
3
+ const { GRECIAN_GREY } = colors;
4
+
5
+ const bannerBackgroundColor = GRECIAN_GREY;
6
+
7
+ export const fallbackValues = {
8
+ bannerBackgroundColor
9
+ };