mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-04-01 14:13:37 +03:00
Add a button here to prevent poll height from jumping
Still quite a hidden feature 🤫
This commit is contained in:
parent
56022f31f0
commit
1ddcb51af5
2 changed files with 59 additions and 44 deletions
|
@ -87,6 +87,7 @@ export default function Poll({
|
|||
}}
|
||||
>
|
||||
{(showResults && optionsHaveVoteCounts) || voted || expired ? (
|
||||
<>
|
||||
<div class="poll-options">
|
||||
{options.map((option, i) => {
|
||||
const { title, votesCount: optionVotesCount } = option;
|
||||
|
@ -135,6 +136,18 @@ export default function Poll({
|
|||
);
|
||||
})}
|
||||
</div>
|
||||
{!expired && !voted && (
|
||||
<button
|
||||
class="poll-vote-button plain2"
|
||||
disabled={uiState === 'loading'}
|
||||
onClick={() => {
|
||||
setShowResults(false);
|
||||
}}
|
||||
>
|
||||
<Icon icon="arrow-left" /> Hide results
|
||||
</button>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<form
|
||||
onSubmit={async (e) => {
|
||||
|
|
|
@ -1035,11 +1035,13 @@ a.card:is(:hover, :focus) {
|
|||
}
|
||||
.poll-vote-button {
|
||||
margin: 8px 8px 0 12px;
|
||||
padding-inline: 24px;
|
||||
/* padding-inline: 24px; */
|
||||
min-width: 160px;
|
||||
}
|
||||
.poll-meta {
|
||||
margin: 8px 16px;
|
||||
font-size: 90%;
|
||||
user-select: none;
|
||||
}
|
||||
.poll-option-title {
|
||||
text-shadow: 0 1px var(--bg-color);
|
||||
|
|
Loading…
Add table
Reference in a new issue