mirror of
https://github.com/facebook/lexical.git
synced 2025-08-06 16:39:33 +08:00
Fix poll plugin
This commit is contained in:

committed by
acywatson

parent
1d3ea9e712
commit
c75a469e3a
@ -69,6 +69,7 @@ const styles = stylex.create({
|
|||||||
fontWeight: 'normal',
|
fontWeight: 'normal',
|
||||||
color: '#999',
|
color: '#999',
|
||||||
},
|
},
|
||||||
|
zIndex: 0,
|
||||||
},
|
},
|
||||||
optionInputVotes: {
|
optionInputVotes: {
|
||||||
backgroundColor: 'rgb(236, 243, 254)',
|
backgroundColor: 'rgb(236, 243, 254)',
|
||||||
@ -77,6 +78,7 @@ const styles = stylex.create({
|
|||||||
top: 0,
|
top: 0,
|
||||||
left: 0,
|
left: 0,
|
||||||
transition: 'width 1s ease',
|
transition: 'width 1s ease',
|
||||||
|
zIndex: 0,
|
||||||
},
|
},
|
||||||
optionInputVotesCount: {
|
optionInputVotesCount: {
|
||||||
color: 'rgb(61,135,245)',
|
color: 'rgb(61,135,245)',
|
||||||
@ -118,7 +120,7 @@ const styles = stylex.create({
|
|||||||
backgroundColor: 'transparent',
|
backgroundColor: 'transparent',
|
||||||
backgroundPosition: '6px 6px',
|
backgroundPosition: '6px 6px',
|
||||||
backgroundRepeat: 'no-repeat',
|
backgroundRepeat: 'no-repeat',
|
||||||
zIndex: 2,
|
zIndex: 0,
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
borderRadius: 5,
|
borderRadius: 5,
|
||||||
opacity: 0.3,
|
opacity: 0.3,
|
||||||
@ -165,7 +167,7 @@ function getTotalVotes(options: DecoratorArray): number {
|
|||||||
// $FlowFixMe: need to revise type
|
// $FlowFixMe: need to revise type
|
||||||
const votes: number = options.reduce((totalVotes, next) => {
|
const votes: number = options.reduce((totalVotes, next) => {
|
||||||
// $FlowFixMe: need to revise type
|
// $FlowFixMe: need to revise type
|
||||||
return totalVotes + next.get('votes').length;
|
return totalVotes + next.get('votes').getLength();
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
return votes;
|
return votes;
|
||||||
|
Reference in New Issue
Block a user