feat: replace StudioFooter with StudioFooterSlot (#1729)
This commit is contained in:
@@ -9,3 +9,6 @@
|
||||
## Course Unit page
|
||||
|
||||
* [`course_unit_header_actions_slot`](./CourseUnitHeaderActionsSlot/)
|
||||
|
||||
## Footer Slot
|
||||
* [`studio_footer_slot`](./StudioFooterSlot/)
|
||||
|
||||
50
src/plugin-slots/StudioFooterSlot/README.md
Normal file
50
src/plugin-slots/StudioFooterSlot/README.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Studio Footer Slot
|
||||
|
||||
### Slot ID: `studio_footer_slot`
|
||||
|
||||
## Description
|
||||
|
||||
This slot is used to replace/modify/hide the footer.
|
||||
|
||||
The implementation of the `StudioFooterSlot` component lives in [the `frontend-slot-footer` repository](https://github.com/openedx/frontend-slot-footer/).
|
||||
|
||||
## Example
|
||||
|
||||
The following `env.config.jsx` will replace the default footer.
|
||||
|
||||

|
||||
|
||||
with a simple custom footer
|
||||
|
||||

|
||||
|
||||
```jsx
|
||||
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
|
||||
|
||||
const config = {
|
||||
pluginSlots: {
|
||||
studio_footer_slot: {
|
||||
plugins: [
|
||||
{
|
||||
// Hide the default footer
|
||||
op: PLUGIN_OPERATIONS.Hide,
|
||||
widgetId: 'default_contents',
|
||||
},
|
||||
{
|
||||
// Insert a custom footer
|
||||
op: PLUGIN_OPERATIONS.Insert,
|
||||
widget: {
|
||||
id: 'custom_footer',
|
||||
type: DIRECT_PLUGIN,
|
||||
RenderWidget: () => (
|
||||
<h1 style={{textAlign: 'center'}}>🦶</h1>
|
||||
),
|
||||
},
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
export default config;
|
||||
```
|
||||
BIN
src/plugin-slots/StudioFooterSlot/images/custom_footer.png
Normal file
BIN
src/plugin-slots/StudioFooterSlot/images/custom_footer.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
Reference in New Issue
Block a user