forked from openedx/frontend-app-learner-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgressCategoryBubbles.tsx
More file actions
42 lines (37 loc) · 1.34 KB
/
ProgressCategoryBubbles.tsx
File metadata and controls
42 lines (37 loc) · 1.34 KB
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
import React from 'react';
import { Bubble, Stack } from '@openedx/paragon';
import { useIntl } from '@edx/frontend-platform/i18n';
import messages from './messages';
import { Progress } from '../data/types';
const ProgressCategoryBubbles: React.FC<Progress> = ({ notStarted, inProgress, completed }) => {
const { formatMessage } = useIntl();
return (
<Stack direction="horizontal" gap={2} className="flex-wrap">
<Stack direction="vertical" className="align-items-center" gap={1}>
<Bubble variant="success" data-testid="completed-count">
{completed}
</Bubble>
<div>
{formatMessage(messages.progressCategoryBubblesSuccess)}
</div>
</Stack>
<Stack direction="vertical" className="align-items-center" gap={1}>
<Bubble data-testid="in-progress-count">
{inProgress}
</Bubble>
<div>
{formatMessage(messages.progressCategoryBubblesInProgress)}
</div>
</Stack>
<Stack direction="vertical" className="align-items-center" gap={1}>
<Bubble className="text-gray-900" variant="warning" data-testid="remaining-count">
{notStarted}
</Bubble>
<div>
{formatMessage(messages.progressCategoryBubblesRemaining)}
</div>
</Stack>
</Stack>
);
};
export default ProgressCategoryBubbles;