@hyphen/hyphen-components 4.5.0 → 4.6.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": "@hyphen/hyphen-components",
3
- "version": "4.5.0",
3
+ "version": "4.6.0",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "@hyphen"
@@ -8,9 +8,9 @@ export interface CardHeaderProps extends BoxProps {
8
8
  */
9
9
  title?: ReactNode;
10
10
  /**
11
- * Description copy of the card
11
+ * Description of the card, or element below the title
12
12
  */
13
- description?: string;
13
+ description?: ReactNode;
14
14
  }
15
15
 
16
16
  export const CardHeader: FC<CardHeaderProps> = ({
@@ -41,9 +41,15 @@ export const CardHeader: FC<CardHeaderProps> = ({
41
41
  </>
42
42
  )}
43
43
  {description && (
44
- <Box fontSize={{ base: 'xs', tablet: 'sm' }} color="secondary">
45
- {description}
46
- </Box>
44
+ <>
45
+ {typeof description === 'string' ? (
46
+ <Box fontSize={{ base: 'xs', tablet: 'sm' }} color="secondary">
47
+ {description}
48
+ </Box>
49
+ ) : (
50
+ description
51
+ )}
52
+ </>
47
53
  )}
48
54
  </Box>
49
55
  {children}