-
Notifications
You must be signed in to change notification settings - Fork 322
Expand file tree
/
Copy pathindex.tsx
More file actions
32 lines (29 loc) · 933 Bytes
/
index.tsx
File metadata and controls
32 lines (29 loc) · 933 Bytes
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
import React from 'react';
import { PluginSlot } from '@openedx/frontend-plugin-framework';
import Section from '@src/course-home/outline-tab/section-outline/Section';
interface Props {
expandAll: boolean;
sections: object;
sectionIds: string[];
}
const CourseHomeSectionOutlineSlot: React.FC<Props> = ({
expandAll, sections, sectionIds,
}) => (
<PluginSlot
id="org.openedx.frontend.learning.course_home_section_outline.v1"
idAliases={['course_home_section_outline_slot']}
pluginProps={{ expandAll, sectionIds, sections }}
>
<ol id="courseHome-outline" className="list-unstyled" role="presentation">
{sectionIds.map((sectionId) => (
<Section
key={sectionId}
defaultOpen={sections[sectionId].resumeBlock}
expand={expandAll}
section={sections[sectionId]}
/>
))}
</ol>
</PluginSlot>
);
export default CourseHomeSectionOutlineSlot;