@hyphen/hyphen-components 4.4.1 → 4.5.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.
@@ -1,21 +1,13 @@
1
1
  import { FC, ReactNode } from 'react';
2
2
  import { BoxProps } from '../../../Box/Box';
3
3
  export interface CardHeaderProps extends BoxProps {
4
- /**
5
- * contents of the Header
6
- */
7
- children?: ReactNode;
8
- /**
9
- * Additional class names to add
10
- */
11
- className?: string;
12
4
  /**
13
5
  * The title of the card
14
6
  */
15
7
  title?: ReactNode;
16
8
  /**
17
- * Additional props to be spread to rendered element
9
+ * Description copy of the card
18
10
  */
19
- [x: string]: any;
11
+ description?: string;
20
12
  }
21
13
  export declare const CardHeader: FC<CardHeaderProps>;
@@ -871,33 +871,30 @@ var Heading = function Heading(_ref) {
871
871
  }, restProps), children);
872
872
  };
873
873
 
874
- var _excluded$F = ["childGap", "children", "className", "display", "padding", "title"];
874
+ var _excluded$F = ["children", "title", "description"];
875
875
  var CardHeader = function CardHeader(_ref) {
876
- var _ref$childGap = _ref.childGap,
877
- childGap = _ref$childGap === void 0 ? '2xs' : _ref$childGap,
878
- _ref$children = _ref.children,
879
- children = _ref$children === void 0 ? null : _ref$children,
880
- _ref$className = _ref.className,
881
- className = _ref$className === void 0 ? undefined : _ref$className,
882
- _ref$display = _ref.display,
883
- display = _ref$display === void 0 ? 'block' : _ref$display,
884
- _ref$padding = _ref.padding,
885
- padding = _ref$padding === void 0 ? '2xl' : _ref$padding,
886
- _ref$title = _ref.title,
887
- title = _ref$title === void 0 ? null : _ref$title,
876
+ var children = _ref.children,
877
+ title = _ref.title,
878
+ description = _ref.description,
888
879
  restProps = _objectWithoutPropertiesLoose(_ref, _excluded$F);
889
- var renderTitle = function renderTitle() {
890
- return typeof title === 'string' ? React.createElement(Heading, {
891
- size: "sm",
892
- as: "h4"
893
- }, title) : title;
894
- };
895
880
  return React.createElement(Box, _extends({
896
- childGap: childGap,
897
- display: display,
898
- padding: padding,
899
- className: className
900
- }, restProps), title && renderTitle(), children);
881
+ padding: "2xl",
882
+ direction: "row",
883
+ gap: "2xl",
884
+ width: "100",
885
+ justifyContent: "space-between"
886
+ }, restProps), React.createElement(Box, {
887
+ gap: "2xs"
888
+ }, title && React.createElement(React.Fragment, null, typeof title === 'string' ? React.createElement(Heading, {
889
+ size: "sm",
890
+ as: "h4"
891
+ }, title) : title), description && React.createElement(Box, {
892
+ fontSize: {
893
+ base: 'xs',
894
+ tablet: 'sm'
895
+ },
896
+ color: "secondary"
897
+ }, description)), children);
901
898
  };
902
899
 
903
900
  var styles$r = {"card-section-border":"Card-module_card-section-border__OefDX"};