}) {
(answer as any)['org.matrix.msc3381.poll.answer']?.body ||
`Option ${i + 1}`;
const id = answer['m.id'] ?? answer.id ?? String(i);
+ const selected = myVote === id;
return (
- handleVote(id) : undefined}
style={{
padding: '7px 12px',
borderRadius: '8px',
- background: 'var(--bg-surface-low)',
- border: '1px solid var(--bg-surface-border)',
+ background: selected ? 'var(--bg-surface-active)' : 'var(--bg-surface-low)',
+ border: `1px solid ${selected ? 'var(--text-primary)' : 'var(--bg-surface-border)'}`,
fontSize: '0.88rem',
lineHeight: 1.4,
+ textAlign: 'left',
+ cursor: canVote ? 'pointer' : 'default',
+ color: 'var(--text-primary)',
+ display: 'flex',
+ alignItems: 'center',
+ gap: '8px',
+ width: '100%',
}}
>
- {text}
-
+ {text}
+ {selected && (
+ ✓
+ )}
+
);
})}
-