fix!: remove FooterSlot component
BREAKING CHANGE: the `FooterSlot` component will now be provided by `frontend-slot-footer`.
This commit is contained in:
committed by
Adolfo R. Brandes
parent
5f7fab236d
commit
ea2578fa15
@@ -1,48 +0,0 @@
|
||||
# Footer Slot
|
||||
|
||||
### Slot ID: `footer_slot`
|
||||
|
||||
## Description
|
||||
|
||||
This slot is used to replace/modify/hide the footer.
|
||||
|
||||
## Example
|
||||
|
||||
The following `env.config.jsx` will replace the default footer.
|
||||
|
||||

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

|
||||
|
||||
```js
|
||||
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
|
||||
|
||||
const config = {
|
||||
pluginSlots: {
|
||||
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;
|
||||
```
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.5 KiB |
@@ -1,11 +0,0 @@
|
||||
import React from 'react';
|
||||
import { PluginSlot } from '@openedx/frontend-plugin-framework';
|
||||
import Footer from '../Footer';
|
||||
|
||||
const FooterSlot = () => (
|
||||
<PluginSlot id="footer_slot">
|
||||
<Footer />
|
||||
</PluginSlot>
|
||||
);
|
||||
|
||||
export default FooterSlot;
|
||||
@@ -1,9 +1,8 @@
|
||||
import Footer, { EVENT_NAMES } from './components/Footer';
|
||||
import messages from './i18n/index';
|
||||
import StudioFooter from './components/studio-footer';
|
||||
import FooterSlot from './components/footer-slot';
|
||||
|
||||
export default Footer;
|
||||
export {
|
||||
messages, EVENT_NAMES, StudioFooter, FooterSlot,
|
||||
messages, EVENT_NAMES, StudioFooter,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user