Repository URL to install this package:
Version:
0.9.6 ▾
|
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const styled_1 = require("./styled");
const Text_1 = __importDefault(require("atoms/Text"));
/**
*
* @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(Text_1.default, { 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