@thecb/components 8.4.0-beta.13 → 8.4.0-beta.14

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": "8.4.0-beta.13",
3
+ "version": "8.4.0-beta.14",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
Binary file
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React, { useContext } from "react";
2
2
  import Heading from "../../atoms/heading";
3
3
  import Paragraph from "../../atoms/paragraph";
4
4
  import { FONT_WEIGHT_SEMIBOLD } from "../../../constants/style_constants";
@@ -6,9 +6,9 @@ import { Box, Stack } from "../../atoms/layouts";
6
6
  import { themeComponent } from "../../../util/themeUtils";
7
7
  import { fallbackValues } from "./LinkCard.theme";
8
8
  import { MOON_RAKER } from "../../../constants/colors";
9
+ import { ThemeContext } from "styled-components";
9
10
 
10
11
  const LinkCard = ({
11
- variant = "default",
12
12
  title = "Test Workflow",
13
13
  subtitle = "Link your benefit plan",
14
14
  themeValues,
@@ -21,6 +21,7 @@ const LinkCard = ({
21
21
  extraHoverStyles = "",
22
22
  extraActiveStyles = ""
23
23
  }) => {
24
+ const { isMobile } = useContext(ThemeContext);
24
25
  const activeAndHoverStyles = `cursor: pointer;
25
26
  border-radius: 8px;
26
27
  border: 1px solid ${themeValues.color};
@@ -32,7 +33,7 @@ const LinkCard = ({
32
33
  dataQa={`link-card-${title}`}
33
34
  width="100%"
34
35
  maxWidth="288px"
35
- minWidth="240px"
36
+ minWidth={isMobile ? "240px" : "288px"}
36
37
  minHeight="141px"
37
38
  padding="24px"
38
39
  extraStyles={`
@@ -109,7 +110,7 @@ const LinkCard = ({
109
110
  direction="row"
110
111
  childGap="6px"
111
112
  justify="space-between"
112
- extraStyles={`width: 100%; justify-content: space-between`}
113
+ extraStyles={`width: 100%; align-items: flex-end;`}
113
114
  >
114
115
  {showLeft && leftContent}
115
116
  {showRight && rightContent}