@ansible/ansible-ui-framework 0.0.413 → 0.0.415

Sign up to get free protection for your applications and to get access to all the features.
@@ -31,5 +31,6 @@ export declare function DetailsList(props: {
31
31
  export declare function Detail(props: {
32
32
  label?: string;
33
33
  children?: ReactNode;
34
+ isEmpty?: boolean;
34
35
  }): JSX.Element;
35
36
  export declare function DetailsSkeleton(): JSX.Element;
@@ -48,9 +48,13 @@ function DetailsList(props) {
48
48
  exports.DetailsList = DetailsList;
49
49
  function Detail(props) {
50
50
  var _a;
51
- if (!props.children)
51
+ if (props.children === null || typeof props.children === 'undefined' || props.children === '') {
52
52
  return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
53
- return ((0, jsx_runtime_1.jsxs)(react_core_1.DescriptionListGroup, { children: [props.label && ((0, jsx_runtime_1.jsx)(react_core_1.DescriptionListTerm, { children: props.label })), (0, jsx_runtime_1.jsx)(react_core_1.DescriptionListDescription, __assign({ id: (_a = props.label) === null || _a === void 0 ? void 0 : _a.toLowerCase().split(' ').join('-') }, { children: props.children }))] }));
53
+ }
54
+ if (props.isEmpty) {
55
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
56
+ }
57
+ return ((0, jsx_runtime_1.jsxs)(react_core_1.DescriptionListGroup, { children: [props.label && (0, jsx_runtime_1.jsx)(react_core_1.DescriptionListTerm, { children: props.label }), (0, jsx_runtime_1.jsx)(react_core_1.DescriptionListDescription, __assign({ id: (_a = props.label) === null || _a === void 0 ? void 0 : _a.toLowerCase().split(' ').join('-') }, { children: props.children }))] }));
54
58
  }
55
59
  exports.Detail = Detail;
56
60
  function DetailsSkeleton() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ansible/ansible-ui-framework",
3
3
  "description": "A framework for building applications using PatternFly.",
4
- "version": "0.0.413",
4
+ "version": "0.0.415",
5
5
  "author": "Red Hat",
6
6
  "license": "MIT",
7
7
  "repository": {