-
Notifications
You must be signed in to change notification settings - Fork 183
Expand file tree
/
Copy pathindex.jsx
More file actions
33 lines (28 loc) · 874 Bytes
/
index.jsx
File metadata and controls
33 lines (28 loc) · 874 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
33
import React from 'react';
import PropTypes from 'prop-types';
import { PluginSlot } from '@openedx/frontend-plugin-framework';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faUserCircle } from '@fortawesome/free-solid-svg-icons';
const LearningUsername = ({ username }) => (
<>
<FontAwesomeIcon icon={faUserCircle} className="d-md-none" size="lg" />
<span data-hj-suppress className="d-none d-md-inline">
{username}
</span>
</>
);
const LearningUsernameSlot = ({ username }) => (
<PluginSlot
id="learning_username_slot"
slotOptions={{
mergeProps: true,
}}
>
<LearningUsername username={username} />
</PluginSlot>
);
LearningUsername.propTypes = {
username: PropTypes.string.isRequired,
};
LearningUsernameSlot.propTypes = LearningUsername.propTypes;
export default LearningUsernameSlot;