UNPKG

@shopgate/engage

Version:
30 lines (29 loc) 795 B
import React from 'react'; import PropTypes from 'prop-types'; import SideNavigationItem from "./SideNavigationItem"; import connect from "./SideNavigationLinksLegal.connector"; /** * SideNavigationLinksLegal component. * @param {Object} props - The component props. * @param {Array<{label: string, url: string}>} [props.links] - The list of legal links. * @returns {*[]} The rendered component or null. */ import { jsx as _jsx } from "react/jsx-runtime"; const SideNavigationLinksLegal = ({ links }) => { if (!links) { return null; } return links.map(({ label, url }) => /*#__PURE__*/_jsx(SideNavigationItem, { href: url, label: label }, url)); }; SideNavigationLinksLegal.defaultProps = { links: null }; export default connect(SideNavigationLinksLegal);