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`
25 lines
636 B
JavaScript
25 lines
636 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
const DesktopLoggedOutItems = ({ items }) => items.map((item, i, arr) => (
|
|
<a
|
|
key={`${item.type}-${item.content}`}
|
|
className={i < arr.length - 1 ? 'btn mr-2 btn-link' : 'btn mr-2 btn-outline-primary'}
|
|
href={item.href}
|
|
>
|
|
{item.content}
|
|
</a>
|
|
));
|
|
|
|
export const desktopLoggedOutItemsDataShape = PropTypes.arrayOf(PropTypes.shape({
|
|
type: PropTypes.oneOf(['item', 'menu']),
|
|
href: PropTypes.string,
|
|
content: PropTypes.string,
|
|
}));
|
|
|
|
DesktopLoggedOutItems.propTypes = {
|
|
items: desktopLoggedOutItemsDataShape,
|
|
};
|
|
|
|
export default DesktopLoggedOutItems;
|