Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
const { item } = this.props;
const isExpanded = this.state.open ? 'open' : '';
const Icon = item.icon ? Feather[item.icon] : null;
const ExpandIcon = this.state.open
? Feather.ChevronDown
: Feather.ChevronRight;
return (
<li>
<a role="button" href="#!">
{item.icon && Icon && }
<span>{item.name}</span>{' '}
{item.badge && (
)}
</a>
{(this.state.open || this.props.isSidebarCollapsed) && (
<ul>
{item.children.map((item, index) => (
))}
</ul></li>
var Paginator = function (_a) {
var _b = _a.activeColor, activeColor = _b === void 0 ? "info" : _b, _c = _a.maxVisible, maxVisible = _c === void 0 ? 3 : _c, _d = _a.onChange, onChange = _d === void 0 ? function () { } : _d, pageCount = _a.pageCount, _e = _a.page, page = _e === void 0 ? 1 : _e, id = _a.id, css = _a.css, className = _a.className;
var controlProps = { pageCount: pageCount, page: page, onChange: onChange };
return (React.createElement(Container, { id: id, css: css, className: className },
React.createElement(ButtonGroup_1.default, { className: "co_bgrp" },
React.createElement(PaginatorControl, __assign({ type: "first" }, controlProps),
React.createElement(Icon.ChevronsLeft, { size: "11" })),
React.createElement(PaginatorControl, __assign({ type: "previous" }, controlProps),
React.createElement(Icon.ChevronLeft, { size: "11" })),
createPagesFragment({ activeColor: activeColor, pageCount: pageCount, maxVisible: maxVisible, page: page, onChange: onChange }),
React.createElement(PaginatorControl, __assign({ type: "next" }, controlProps),
React.createElement(Icon.ChevronRight, { size: "11" })),
React.createElement(PaginatorControl, __assign({ type: "last" }, controlProps),
React.createElement(Icon.ChevronsRight, { size: "11" })))));
};
exports.default = Paginator;
var Paginator = function (_a) {
var _b = _a.maxVisible, maxVisible = _b === void 0 ? 3 : _b, _c = _a.onChange, onChange = _c === void 0 ? function () { } : _c, pageCount = _a.pageCount, _d = _a.page, page = _d === void 0 ? 1 : _d, id = _a.id, css = _a.css, className = _a.className;
var controlProps = { pageCount: pageCount, page: page, onChange: onChange };
return (React.createElement(Container, { id: id, css: css, className: className },
React.createElement(PaginatorControl, __assign({ type: "first" }, controlProps),
React.createElement(Icon.ChevronsLeft, { size: "11" })),
React.createElement(PaginatorControl, __assign({ type: "previous" }, controlProps),
React.createElement(Icon.ChevronLeft, { size: "11" })),
createPagesFragment({ pageCount: pageCount, maxVisible: maxVisible, page: page, onChange: onChange }),
React.createElement(PaginatorControl, __assign({ type: "next" }, controlProps),
React.createElement(Icon.ChevronRight, { size: "11" })),
React.createElement(PaginatorControl, __assign({ type: "last" }, controlProps),
React.createElement(Icon.ChevronsRight, { size: "11" }))));
};
exports.default = Paginator;