Skip to content

Commit

Permalink
feat: add frontend-plugin-framework slots (#545)
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
brian-smith-tcril authored Oct 22, 2024
1 parent c64a201 commit a346dcc
Show file tree
Hide file tree
Showing 79 changed files with 2,328 additions and 401 deletions.
222 changes: 0 additions & 222 deletions src/DesktopHeader.jsx

This file was deleted.

8 changes: 4 additions & 4 deletions src/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
} from '@edx/frontend-platform';

import PropTypes from 'prop-types';
import DesktopHeader from './DesktopHeader';
import MobileHeader from './MobileHeader';
import DesktopHeaderSlot from './plugin-slots/DesktopHeaderSlot';
import MobileHeaderSlot from './plugin-slots/MobileHeaderSlot';

import messages from './Header.messages';

Expand Down Expand Up @@ -123,10 +123,10 @@ const Header = ({
return (
<>
<Responsive maxWidth={769}>
<MobileHeader {...props} />
<MobileHeaderSlot props={props} />
</Responsive>
<Responsive minWidth={769}>
<DesktopHeader {...props} />
<DesktopHeaderSlot props={props} />
</Responsive>
</>
);
Expand Down
4 changes: 3 additions & 1 deletion src/Logo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ const Logo = ({
</a>
);

Logo.propTypes = {
export const logoDataShape = {
href: PropTypes.string.isRequired,
src: PropTypes.string.isRequired,
alt: PropTypes.string.isRequired,
};

Logo.propTypes = logoDataShape;

export default Logo;
Loading

0 comments on commit a346dcc

Please sign in to comment.