@aboutbits/react-ui
Advanced tools
Comparing version 0.0.22 to 0.0.23
@@ -14,4 +14,8 @@ import { ReactNode } from 'react'; | ||
title: ReactNode; | ||
/** | ||
* Defines if the component appears or not depending on if the content is empty (null) or not. | ||
* */ | ||
hideIfEmpty?: boolean; | ||
}; | ||
export declare const SectionDescriptionItem: React.FC<SectionDescriptionItemProps>; | ||
export {}; |
@@ -9,6 +9,6 @@ "use strict"; | ||
var SectionDescriptionItem = function (_a) { | ||
var title = _a.title, content = _a.content, className = _a.className; | ||
var title = _a.title, content = _a.content, className = _a.className, _b = _a.hideIfEmpty, hideIfEmpty = _b === void 0 ? false : _b; | ||
var section = framework_1.useTheme().section; | ||
return (jsx_runtime_1.jsxs("dl", tslib_1.__assign({ className: classnames_1.default(section.descriptionItem.base, className) }, { children: [jsx_runtime_1.jsx("dt", tslib_1.__assign({ className: section.descriptionItem.title.base }, { children: title }), void 0), jsx_runtime_1.jsx("dd", { children: content }, void 0)] }), void 0)); | ||
return (jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: ((hideIfEmpty && content) || !hideIfEmpty) && (jsx_runtime_1.jsxs("dl", tslib_1.__assign({ className: classnames_1.default(section.descriptionItem.base, className) }, { children: [jsx_runtime_1.jsx("dt", tslib_1.__assign({ className: section.descriptionItem.title.base }, { children: title }), void 0), jsx_runtime_1.jsx("dd", { children: content }, void 0)] }), void 0)) }, void 0)); | ||
}; | ||
exports.SectionDescriptionItem = SectionDescriptionItem; |
{ | ||
"name": "@aboutbits/react-ui", | ||
"version": "0.0.22", | ||
"version": "0.0.23", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "types": "index.d.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
165640
3629