Skip to content

Commit 8bcadd3

Browse files
committed
Improve progress bar, radio group.
1 parent cc7ebfd commit 8bcadd3

File tree

4 files changed

+9
-26
lines changed

4 files changed

+9
-26
lines changed

src/lib/components/ProgressBar/StandaloneProgressBar.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ const StandaloneProgressBar = () => {
1717
if (value <= 100) {
1818
setprogressState({
1919
audibleFeedback: completed
20-
? "Your file upload has completed."
21-
: "Your file is uplaoding.",
20+
? "Your file upload has completed"
21+
: "Your file is uploadings",
2222
description: completed
23-
? "Your file has been uploaded."
24-
: `Your file is ${value}% uploaded.`,
23+
? "Your file has been uploaded"
24+
: `Your file is ${value}% uploaded`,
2525
value: completed ? 100 : value + 1
2626
});
2727
}
@@ -39,7 +39,7 @@ const StandaloneProgressBar = () => {
3939
id="progress-bar"
4040
label="Uploading"
4141
ref={progressEl}
42-
tooltip="top"
42+
tooltip="bottom"
4343
value={progressState.value}
4444
/>
4545
</div>

src/lib/components/RadioGroupInput/RadioButtonInput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ RadioButtonInput.propTypes = {
5353
id: PropTypes.string.isRequired,
5454
label: PropTypes.string.isRequired,
5555
name: PropTypes.string.isRequired,
56-
onChange: PropTypes.func.isRequired,
56+
onChange: PropTypes.func,
5757
selected: PropTypes.bool,
5858
value: PropTypes.string.isRequired
5959
};

src/pages/ProgressBarPage.js

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
import React, { useEffect, useRef } from "react";
1+
import React from "react";
22
import ProgressBar from "../lib/components/ProgressBar/ProgressBar.js";
33
import StandaloneProgressBar from "../lib/components/ProgressBar/StandaloneProgressBar.js";
44

55
const ProgressBarPage = () => {
6-
const ref = useRef(null);
7-
8-
useEffect(() => {
9-
ref.current.focus();
10-
});
11-
126
return (
137
<div>
148
<h1>Progress Bar</h1>
@@ -36,7 +30,6 @@ const ProgressBarPage = () => {
3630
description="You have encountered 25 out of 100 words in Level 3."
3731
id="pb3"
3832
label="Level 3"
39-
ref={ref}
4033
tooltip="top"
4134
value={25}
4235
/>
@@ -60,18 +53,7 @@ const ProgressBarPage = () => {
6053
/>
6154
</div>
6255
</div>
63-
<div className="section">
64-
<ProgressBar
65-
description="Full width progress bar"
66-
id="pb6"
67-
label="Uploading"
68-
tooltip="bottom"
69-
value={45}
70-
/>
71-
</div>
72-
<div className="section">
73-
<StandaloneProgressBar />
74-
</div>
56+
<StandaloneProgressBar />
7557
</div>
7658
);
7759
};

src/scss/styles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,7 @@ $file-browser-height: 2rem;
555555
outline: none;
556556
}
557557

558+
&:focus,
558559
&:hover {
559560
.progress-meter {
560561
background-color: $blue;

0 commit comments

Comments
 (0)