Repository URL to install this package:
|
Version:
2.7.11 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const styled_1 = require("./styled");
/**
*
* @param item each item from map function
* @param props list props whichc shared through the list function
*/
function renderItem(item, props) {
const textContent = item.label || 'undefined';
return react_1.default.createElement(styled_1.StyledText, {
content: textContent
});
}
exports.renderItem = renderItem;
/**
* rendering the list
*/
function renderList(props) {
const {
list
} = props;
return list.map((item, index) => react_1.default.createElement(styled_1.ItemPanel, null, props.renderItem(item, props)));
}
exports.renderList = renderList;
/**
* rendering the wrapper
*/
function renderWrapper(props) {
const {
className,
children,
isHorizontalView
} = props;
return react_1.default.createElement(styled_1.ListWrapper, {
className: className,
isHorizontalView: isHorizontalView
}, children);
}
exports.renderWrapper = renderWrapper; //# sourceMappingURL=renderProps.js.map