-
Notifications
You must be signed in to change notification settings - Fork 0
/
sidebar-plugin-example.env.config.jsx
64 lines (57 loc) · 1.29 KB
/
sidebar-plugin-example.env.config.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
Basic Frontend Pluggability Workshop Example.
*/
import {
DIRECT_PLUGIN,
IFRAME_PLUGIN,
PLUGIN_OPERATIONS,
} from '@openedx/frontend-plugin-framework';
import {
Badge,
Card,
Container,
Truncate,
Hyperlink,
} from '@openedx/paragon';
const sidebarRecommender = () => (
<Container>
<h3 className="p2-b">
Other courses for you
</h3>
<div className="product-card-container d-flex">
<Card className="mb-4" orientation="horizontal">
<Card.ImageCap
src="https://picsum.photos/360/200/"
srcAlt="Card image"
logoSrc="https://picsum.photos/150/150"
logoAlt="Card logo"
/>
<Card.Section
title="Section title"
>
Course recommendation
</Card.Section>
<Card.Footer orientation="horizontal">
</Card.Footer>
</Card>
</div>
</Container>
);
const config = {
pluginSlots: {
widget_sidebar_plugin_slot: {
keepDefault: false,
plugins: [
{
op: PLUGIN_OPERATIONS.Insert,
widget: {
id: 'sidebar_iframe_plugin',
type: DIRECT_PLUGIN,
RenderWidget: sidebarRecommender,
},
}
],
},
},
}
export default config;