Skip to content

Commit 871b384

Browse files
committed
docs: add slot readme example
1 parent 9cbcd99 commit 871b384

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

src/plugin-slots/LanguageSelectorSlot/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,28 @@ This slot is used to repace/modify/hide the language selector in the footer.
1111

1212
## Example
1313

14+
![Screenshot default language selector](images/default_lang_selector.png)
15+
16+
Use the following snipped to hide the selector
17+
18+
![Screenshot hidden language selector](images/hidden_lang_selector.png)
19+
20+
```jsx
21+
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
22+
23+
const config = {
24+
pluginSlots: {
25+
'org.openedx.frontend.layout.footer_lang_selector.v1': {
26+
plugins: [
27+
{
28+
// Hide the default footer
29+
op: PLUGIN_OPERATIONS.Hide,
30+
widgetId: 'default_contents',
31+
},
32+
]
33+
}
34+
},
35+
}
36+
37+
export default config;
38+
```
12.2 KB
Loading
7.77 KB
Loading

0 commit comments

Comments
 (0)