Skip to content

Commit

Permalink
Merge pull request #21 from lolsteve/progressbar_percentage
Browse files Browse the repository at this point in the history
Changed progress bar width to be a percentage
  • Loading branch information
Secretmapper authored Dec 20, 2017
2 parents 29593bb + aaf644d commit 5490575
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,35 +1,63 @@
exports[`test ProgressBar leeching 1`] = `
<div
className="progressBar leeching">
<progress
max="100"
value={50} />
<div
aria-valuemax="100"
aria-valuemin="0"
aria-valuenow={50}
role="progressbar"
style={
Object {
"width": "50%",
}
} />
</div>
`;

exports[`test ProgressBar magnet 1`] = `
<div
className="progressBar magnet">
<progress
max="100"
value={50} />
<div
aria-valuemax="100"
aria-valuemin="0"
aria-valuenow={50}
role="progressbar"
style={
Object {
"width": "50%",
}
} />
</div>
`;

exports[`test ProgressBar paused 1`] = `
<div
className="progressBar paused">
<progress
max="100"
value={50} />
<div
aria-valuemax="100"
aria-valuemin="0"
aria-valuenow={50}
role="progressbar"
style={
Object {
"width": "50%",
}
} />
</div>
`;

exports[`test ProgressBar seeding 1`] = `
<div
className="progressBar seeding">
<progress
max="100"
value={50} />
<div
aria-valuemax="100"
aria-valuemin="0"
aria-valuenow={50}
role="progressbar"
style={
Object {
"width": "50%",
}
} />
</div>
`;
2 changes: 1 addition & 1 deletion src/components/Torrent/ProgressBar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function ProgressBar({ torrent }) {
aria-valuenow={getPercentage(torrent)}
aria-valuemin='0'
aria-valuemax="100"
style={{ width: getPercentage(torrent) }}
style={{ width: getPercentage(torrent) + '%' }}
/>
</div>
);
Expand Down

0 comments on commit 5490575

Please sign in to comment.