@thecb/components 8.4.0-beta.2 → 8.4.0-beta.3

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.2",
3
+ "version": "8.4.0-beta.3",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -20,7 +20,8 @@ const LinkCard = ({
20
20
  showLeft,
21
21
  leftContent,
22
22
  showRight,
23
- rightContent
23
+ rightContent,
24
+ onClick = () => navigate(path)
24
25
  }) => {
25
26
  const navigate = useNavigate();
26
27
  const activeHoverStyles = `
@@ -53,9 +54,7 @@ const LinkCard = ({
53
54
  align-self: stretch;"
54
55
  hoverStyles={activeHoverStyles}
55
56
  activeStyles={activeHoverStyles}
56
- onClick={() => {
57
- navigate(path);
58
- }}
57
+ onClick={onClick}
59
58
  >
60
59
  <Stack childGap={0} bottomItem={3} fullHeight>
61
60
  <Box padding={"1rem 1rem 0 1rem"}>
@@ -97,8 +96,10 @@ const LinkCard = ({
97
96
  padding="0 1rem 1rem 1rem"
98
97
  >
99
98
  <Stack direction="row" justify="space-between">
100
- {showLeft && leftContent}
101
- {showRight && rightContent}
99
+ <Stack direction="row" childGap="6px">
100
+ {showLeft && leftContent}
101
+ {showRight && rightContent}
102
+ </Stack>
102
103
 
103
104
  {/* <Stack direction="row" childGap="6px">
104
105
  <Text
@@ -11,6 +11,7 @@ export interface LinkCardProps {
11
11
  leftContent?: JSX.Element;
12
12
  showRight?: boolean;
13
13
  rightContent?: JSX.Element;
14
+ onClick: () => void;
14
15
  }
15
16
 
16
17
  export const LinkCard: React.FC<Expand<LinkCardProps> &