courseOrg
courseNumber
courseTitle
showUserDropdown
This slot is used to replace/modify/hide the entire learning header.
The following env.config.jsx
will replace the learning header entirely.
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
const config = {
pluginSlots: {
header_slot: {
keepDefault: false,
plugins: [
{
op: PLUGIN_OPERATIONS.Insert,
widget: {
id: 'custom_header_component',
type: DIRECT_PLUGIN,
RenderWidget: ({courseOrg, courseNumber, courseTitle, showUserDropdown}) => (
<>
<h1 style={{textAlign: 'center'}}>🌞</h1>
<p style={{textAlign: 'center'}}>courseOrg: {courseOrg}</p>
<p style={{textAlign: 'center'}}>courseNumber: {courseNumber}</p>
<p style={{textAlign: 'center'}}>courseTitle: {courseTitle}</p>
<p style={{textAlign: 'center'}}>showUserDropdown: {showUserDropdown ? '👍' : '👎'}</p>
<h1 style={{textAlign: 'center'}}>🌚</h1>
</>
),
},
},
]
}
},
}
export default config;