Add the following `frontend-plugin-framework` slots: * `logo_slot` * `desktop_main_menu_slot` * `desktop_secondary_menu_slot` * `mobile_main_menu_slot` * `course_info_slot` * `learning_help_slot` * `desktop_logged_out_items_slot` * `mobile_logged_out_items_slot` * `mobile_user_menu_slot` * `desktop_user_menu_slot` * `learning_user_menu_slot` * `learning_logged_out_items_slot` * `desktop_header_slot`
26 lines
708 B
JavaScript
26 lines
708 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
const MobileLoggedOutItems = ({ items }) => items.map(({ type, href, content }, i, arr) => (
|
|
<li className="nav-item px-3 my-2" key={`${type}-${content}`}>
|
|
<a
|
|
className={i < arr.length - 1 ? 'btn btn-block btn-outline-primary' : 'btn btn-block btn-primary'}
|
|
href={href}
|
|
>
|
|
{content}
|
|
</a>
|
|
</li>
|
|
));
|
|
|
|
export const mobileHeaderLoggedOutItemsDataShape = PropTypes.arrayOf(PropTypes.shape({
|
|
type: PropTypes.oneOf(['item', 'menu']),
|
|
href: PropTypes.string,
|
|
content: PropTypes.string,
|
|
}));
|
|
|
|
MobileLoggedOutItems.propTypes = {
|
|
menu: mobileHeaderLoggedOutItemsDataShape,
|
|
};
|
|
|
|
export default MobileLoggedOutItems;
|