@thecb/components 7.9.4-beta.3 → 7.9.4-beta.5

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": "7.9.4-beta.3",
3
+ "version": "7.9.4-beta.5",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -2,7 +2,6 @@ import React, { useState } from "react";
2
2
  import Checkbox from "../../atoms/checkbox";
3
3
  import { Box, Stack, Cluster } from "../../atoms/layouts";
4
4
  import Text from "../../atoms/text";
5
- import Paragraph from "../../atoms/paragraph";
6
5
  import TermsAndConditionsModal from "../terms-and-conditions-modal";
7
6
  import {
8
7
  ATHENS_GREY,
@@ -25,7 +24,8 @@ const TermsAndConditionsControlV2 = ({
25
24
  displayInline = true,
26
25
  modalVariant = "default",
27
26
  containerBackground = ATHENS_GREY,
28
- checkboxMargin = "0 0.5rem 0 0"
27
+ checkboxMargin = "4px 8px 4px 4px",
28
+ modalTitle = "Terms and Conditions"
29
29
  }) => {
30
30
  const [showTerms, toggleShowTerms] = useState(false);
31
31
  const standardBoxShadow = generateShadows().standard.base;
@@ -40,7 +40,7 @@ const TermsAndConditionsControlV2 = ({
40
40
  >
41
41
  <Stack childGap="0.25rem">
42
42
  {html && <Box padding="0">{html}</Box>}
43
- <Cluster justify="flex-start" align="flex-start" nowrap>
43
+ <Cluster justify="flex-start" align="center" nowrap>
44
44
  {showCheckbox && (
45
45
  <Checkbox
46
46
  name={id}
@@ -50,11 +50,14 @@ const TermsAndConditionsControlV2 = ({
50
50
  checkboxMargin={checkboxMargin}
51
51
  />
52
52
  )}
53
- <Stack childGap="0.25rem">
54
- <Cluster justify="flex-start" align="center" nowrap>
55
- {description && (
56
- <Text color={CHARADE_GREY}>{description}&nbsp;</Text>
57
- )}
53
+ <Stack childGap="0.25rem" fullHeight>
54
+ <Cluster
55
+ justify="flex-start"
56
+ align="center"
57
+ nowrap
58
+ extraStyles={`padding-right: 2px; > div > * { margin: 4px 2px; };`}
59
+ >
60
+ {description && <Text color={CHARADE_GREY}>{description}</Text>}
58
61
  {terms && (
59
62
  <TermsAndConditionsModal
60
63
  link={linkText}
@@ -62,6 +65,7 @@ const TermsAndConditionsControlV2 = ({
62
65
  isOpen={showTerms}
63
66
  toggleOpen={toggleShowTerms}
64
67
  linkVariant={modalVariant}
68
+ title={modalTitle}
65
69
  />
66
70
  )}
67
71
  </Cluster>