course_outline_unit_card_extra_actions_slot
unit- objectsection- objectsubsection- object
See the PropTypes definition in the slot for the attributes available in each of these objects.
The slot is positioned right before the drop-down menu icon in the Unit cards of the Course Outline page. It is best suited for adding icon buttons.
The slot by default is empty.
Default view of the unit cards in the course outline page.
The unit card with a custom icon-button inserted in the slot.
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
import { IconButton } from '@openedx/paragon';
import { Help } from '@openedx/paragon/icons';
const MyIconButton = () => (
<IconButton iconAs={Help} />
);
const config = {
pluginSlots: {
'org.openedx.frontend.authoring.course_outline_unit_card_extra_actions.v1': {
keepDefault: true,
plugins: [
{
op: PLUGIN_OPERATIONS.Insert,
widget: {
id: 'my-extra-icon',
priority: 60,
type: DIRECT_PLUGIN,
RenderWidget: MyIconButton,
},
},
]
}
},
}
export default config;
