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
@@ -85,7 +85,6 @@ This library has the following exports:
|
||||
* ``(default)``: The footer as a React component.
|
||||
* ``messages``: Internationalization messages suitable for use with `@edx/frontend-platform/i18n <https://edx.github.io/frontend-platform/module-Internationalization.html>`_
|
||||
* ``dist/footer.scss``: A SASS file which contains style information for the component. It should be imported into the micro-frontend's own SCSS file.
|
||||
* ``FooterSlot``: The footer wrapped in a `Frontend Plugin Framework <https://github.com/openedx/frontend-plugin-framework>`_ ``PluginSlot``.
|
||||
|
||||
<Footer /> component props
|
||||
==========================
|
||||
@@ -96,9 +95,9 @@ This library has the following exports:
|
||||
|
||||
Plugin
|
||||
======
|
||||
This package provides a wrapped version of the footer using `Frontend Plugin Framework <https://github.com/openedx/frontend-plugin-framework>`_.
|
||||
The footer can be replaced using using `Frontend Plugin Framework <https://github.com/openedx/frontend-plugin-framework>`_.
|
||||
|
||||
Information on how to utilize the ``FooterSlot`` is available `here </src/components/footer-slot>`_.
|
||||
Information on how to utilize the ``FooterSlot`` component to do so is available in the `frontend-slot-footer repository <https://github.com/openedx/frontend-slot-footer/>`_.
|
||||
|
||||
Examples
|
||||
========
|
||||
|
||||
6
package-lock.json
generated
6
package-lock.json
generated
@@ -40,16 +40,10 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@edx/frontend-platform": "^7.0.0 || ^8.0.0",
|
||||
"@openedx/frontend-plugin-framework": "^1.1.2",
|
||||
"@openedx/paragon": ">= 21.11.3 < 23.0.0",
|
||||
"prop-types": "^15.5.10",
|
||||
"react": "^16.9.0 || ^17.0.0",
|
||||
"react-dom": "^16.9.0 || ^17.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@openedx/frontend-plugin-framework": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@aashutoshrathi/word-wrap": {
|
||||
|
||||
@@ -65,15 +65,9 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@edx/frontend-platform": "^7.0.0 || ^8.0.0",
|
||||
"@openedx/frontend-plugin-framework": "^1.1.2",
|
||||
"@openedx/paragon": ">= 21.11.3 < 23.0.0",
|
||||
"prop-types": "^15.5.10",
|
||||
"react": "^16.9.0 || ^17.0.0",
|
||||
"react-dom": "^16.9.0 || ^17.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@openedx/frontend-plugin-framework": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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