Progress bar on voting page

This commit is contained in:
Kalle
2022-06-12 14:11:44 +03:00
parent fc39e133c4
commit 2c46658bbb
3 changed files with 17 additions and 1 deletions

View File

@@ -115,6 +115,14 @@ function Voting(data: Extract<PlusVotingLoaderData, { type: "voting" }>) {
return (
<div className="plus-voting__container stack md">
{progress ? (
<progress
className="plus-voting__progress"
value={progress[0]}
max={progress[1]}
title={`Voting progress ${progress[0]} out of ${progress[1]}`}
/>
) : null}
{previous ? (
<p className="button-text-paragraph text-sm text-lighter">
Previously{" "}

View File

@@ -221,6 +221,10 @@ textarea:not(.plain) {
white-space: pre;
}
progress {
accent-color: var(--theme);
}
textarea:not(.plain):focus-within {
border-color: transparent;

View File

@@ -104,10 +104,14 @@
.plus-voting__vote-button {
width: 6rem;
height: 2.5rem;
font-size: var(--fonts-md);
color: var(--text) !important;
font-size: var(--fonts-md);
}
.plus-voting__vote-button.downvote {
border-color: var(--theme-error-transparent);
}
.plus-voting__progress {
width: 100%;
}