@shopgate/engage
Version:
Shopgate's ENGAGE library.
30 lines (29 loc) • 706 B
JavaScript
import React from 'react';
import PropTypes from 'prop-types';
import SideNavigationItem from "./SideNavigationItem";
import connect from "./SideNavigationLinksQuicklinks.connector";
/**
*
* @param {Object} props The component props
* @param {Array} props.links The quicklinks links
* @returns {*[]}
*/
import { jsx as _jsx } from "react/jsx-runtime";
const SideNavigationLinksQuicklinks = ({
links
}) => {
if (!links) {
return null;
}
return links.map(({
label,
url
}) => /*#__PURE__*/_jsx(SideNavigationItem, {
href: url,
label: label
}, url));
};
SideNavigationLinksQuicklinks.defaultProps = {
links: null
};
export default connect(SideNavigationLinksQuicklinks);