2021-11-23 18:27:44 +08:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
2021-12-08 22:56:48 +08:00
|
|
|
exports[`MPollBody renders a finished poll 1`] = `
|
|
|
|
<Wrapper
|
|
|
|
getRelationsForEvent={[Function]}
|
|
|
|
mxEvent={
|
|
|
|
Object {
|
|
|
|
"content": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
|
|
|
"org.matrix.msc3381.poll.start": Object {
|
|
|
|
"answers": Array [
|
|
|
|
Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
|
|
|
"question": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-18 01:06:30 +08:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<MPollBody
|
|
|
|
getRelationsForEvent={[Function]}
|
|
|
|
mxEvent={
|
|
|
|
Object {
|
|
|
|
"content": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
|
|
|
"org.matrix.msc3381.poll.start": Object {
|
|
|
|
"answers": Array [
|
|
|
|
Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
|
|
|
"question": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-18 01:06:30 +08:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody"
|
|
|
|
>
|
|
|
|
<h2>
|
|
|
|
What should we order for the party?
|
|
|
|
</h2>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_allOptions"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="pizza"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "pizza",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Pizza",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Pizza",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
votesText="0 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption"
|
|
|
|
data-value="pizza"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionDescription"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Pizza
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</EndedPollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "0%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="poutine"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "poutine",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Poutine",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Poutine",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
votesText="0 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption"
|
|
|
|
data-value="poutine"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionDescription"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Poutine
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</EndedPollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "0%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option mx_MPollBody_option_checked"
|
|
|
|
key="italian"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "italian",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Italian",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Italian",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={true}
|
|
|
|
votesText="2 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption mx_MPollBody_endedOptionWinner"
|
|
|
|
data-value="italian"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionDescription"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Italian
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
2 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</EndedPollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "67%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="wings"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "wings",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Wings",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Wings",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
votesText="1 vote"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption"
|
|
|
|
data-value="wings"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionDescription"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Wings
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
1 vote
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</EndedPollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "33%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_totalVotes"
|
|
|
|
>
|
|
|
|
Final result based on 3 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</MPollBody>
|
|
|
|
</Wrapper>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`MPollBody renders a finished poll with multiple winners 1`] = `
|
|
|
|
<Wrapper
|
|
|
|
getRelationsForEvent={[Function]}
|
|
|
|
mxEvent={
|
|
|
|
Object {
|
|
|
|
"content": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
|
|
|
"org.matrix.msc3381.poll.start": Object {
|
|
|
|
"answers": Array [
|
|
|
|
Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
|
|
|
"question": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-18 01:06:30 +08:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<MPollBody
|
|
|
|
getRelationsForEvent={[Function]}
|
|
|
|
mxEvent={
|
|
|
|
Object {
|
|
|
|
"content": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
|
|
|
"org.matrix.msc3381.poll.start": Object {
|
|
|
|
"answers": Array [
|
|
|
|
Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
|
|
|
"question": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-18 01:06:30 +08:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody"
|
|
|
|
>
|
|
|
|
<h2>
|
|
|
|
What should we order for the party?
|
|
|
|
</h2>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_allOptions"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option mx_MPollBody_option_checked"
|
|
|
|
key="pizza"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "pizza",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Pizza",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Pizza",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={true}
|
|
|
|
votesText="2 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption mx_MPollBody_endedOptionWinner"
|
|
|
|
data-value="pizza"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionDescription"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Pizza
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
2 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</EndedPollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "50%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="poutine"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "poutine",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Poutine",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Poutine",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
votesText="0 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption"
|
|
|
|
data-value="poutine"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionDescription"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Poutine
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</EndedPollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "0%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="italian"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "italian",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Italian",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Italian",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
votesText="0 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption"
|
|
|
|
data-value="italian"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionDescription"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Italian
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</EndedPollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "0%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option mx_MPollBody_option_checked"
|
|
|
|
key="wings"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "wings",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Wings",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Wings",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={true}
|
|
|
|
votesText="2 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption mx_MPollBody_endedOptionWinner"
|
|
|
|
data-value="wings"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionDescription"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Wings
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
2 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</EndedPollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "50%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_totalVotes"
|
|
|
|
>
|
|
|
|
Final result based on 4 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</MPollBody>
|
|
|
|
</Wrapper>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`MPollBody renders a finished poll with no votes 1`] = `
|
|
|
|
<Wrapper
|
|
|
|
getRelationsForEvent={[Function]}
|
|
|
|
mxEvent={
|
|
|
|
Object {
|
|
|
|
"content": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
|
|
|
"org.matrix.msc3381.poll.start": Object {
|
|
|
|
"answers": Array [
|
|
|
|
Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
|
|
|
"question": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-18 01:06:30 +08:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<MPollBody
|
|
|
|
getRelationsForEvent={[Function]}
|
|
|
|
mxEvent={
|
|
|
|
Object {
|
|
|
|
"content": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
|
|
|
"org.matrix.msc3381.poll.start": Object {
|
|
|
|
"answers": Array [
|
|
|
|
Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
|
|
|
"question": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-18 01:06:30 +08:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody"
|
|
|
|
>
|
|
|
|
<h2>
|
|
|
|
What should we order for the party?
|
|
|
|
</h2>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_allOptions"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="pizza"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "pizza",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Pizza",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Pizza",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
votesText="0 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption"
|
|
|
|
data-value="pizza"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionDescription"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Pizza
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</EndedPollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "0%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="poutine"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "poutine",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Poutine",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Poutine",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
votesText="0 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption"
|
|
|
|
data-value="poutine"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionDescription"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Poutine
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</EndedPollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "0%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="italian"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "italian",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Italian",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Italian",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
votesText="0 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption"
|
|
|
|
data-value="italian"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionDescription"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Italian
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</EndedPollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "0%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="wings"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "wings",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Wings",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Wings",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
votesText="0 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption"
|
|
|
|
data-value="wings"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionDescription"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Wings
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</EndedPollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "0%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_totalVotes"
|
|
|
|
>
|
|
|
|
Final result based on 0 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</MPollBody>
|
|
|
|
</Wrapper>
|
|
|
|
`;
|
|
|
|
|
2021-12-03 18:26:28 +08:00
|
|
|
exports[`MPollBody renders a poll that I have not voted in 1`] = `
|
|
|
|
<Wrapper
|
|
|
|
getRelationsForEvent={[Function]}
|
|
|
|
mxEvent={
|
|
|
|
Object {
|
|
|
|
"content": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
|
|
|
"org.matrix.msc3381.poll.start": Object {
|
|
|
|
"answers": Array [
|
|
|
|
Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
|
|
|
"question": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-18 01:06:30 +08:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-12-03 18:26:28 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<MPollBody
|
|
|
|
getRelationsForEvent={[Function]}
|
|
|
|
mxEvent={
|
|
|
|
Object {
|
|
|
|
"content": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
|
|
|
"org.matrix.msc3381.poll.start": Object {
|
|
|
|
"answers": Array [
|
|
|
|
Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
|
|
|
"question": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-18 01:06:30 +08:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-12-03 18:26:28 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody"
|
|
|
|
>
|
|
|
|
<h2>
|
|
|
|
What should we order for the party?
|
|
|
|
</h2>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_allOptions"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="pizza"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "pizza",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Pizza",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Pizza",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
2021-12-03 18:26:28 +08:00
|
|
|
checked={false}
|
2021-12-08 22:56:48 +08:00
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText=""
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<StyledRadioButton
|
|
|
|
checked={false}
|
|
|
|
childrenInLabel={true}
|
|
|
|
className=""
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="pizza"
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_StyledRadioButton_enabled"
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="pizza"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
2021-12-03 18:26:28 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_StyledRadioButton_content"
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Pizza
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
/>
|
2021-12-03 18:26:28 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
2021-12-03 18:26:28 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "0%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="poutine"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "poutine",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Poutine",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Poutine",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
2021-12-03 18:26:28 +08:00
|
|
|
checked={false}
|
2021-12-08 22:56:48 +08:00
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText=""
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<StyledRadioButton
|
|
|
|
checked={false}
|
|
|
|
childrenInLabel={true}
|
|
|
|
className=""
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="poutine"
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_StyledRadioButton_enabled"
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="poutine"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
2021-12-03 18:26:28 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_StyledRadioButton_content"
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Poutine
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
/>
|
2021-12-03 18:26:28 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
2021-12-03 18:26:28 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "0%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="italian"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "italian",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Italian",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Italian",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
2021-12-03 18:26:28 +08:00
|
|
|
checked={false}
|
2021-12-08 22:56:48 +08:00
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText=""
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<StyledRadioButton
|
|
|
|
checked={false}
|
|
|
|
childrenInLabel={true}
|
|
|
|
className=""
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="italian"
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_StyledRadioButton_enabled"
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="italian"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
2021-12-03 18:26:28 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_StyledRadioButton_content"
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Italian
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
/>
|
2021-12-03 18:26:28 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
2021-12-03 18:26:28 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "0%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="wings"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "wings",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Wings",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Wings",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
2021-12-03 18:26:28 +08:00
|
|
|
checked={false}
|
2021-12-08 22:56:48 +08:00
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText=""
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<StyledRadioButton
|
|
|
|
checked={false}
|
|
|
|
childrenInLabel={true}
|
|
|
|
className=""
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="wings"
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_StyledRadioButton_enabled"
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="wings"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
2021-12-03 18:26:28 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_StyledRadioButton_content"
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-03 18:26:28 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Wings
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
/>
|
2021-12-03 18:26:28 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
2021-12-03 18:26:28 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "0%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_totalVotes"
|
|
|
|
>
|
|
|
|
3 votes cast. Vote to see the results
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</MPollBody>
|
|
|
|
</Wrapper>
|
|
|
|
`;
|
|
|
|
|
2021-11-23 18:27:44 +08:00
|
|
|
exports[`MPollBody renders a poll with local, non-local and invalid votes 1`] = `
|
|
|
|
<Wrapper
|
|
|
|
getRelationsForEvent={[Function]}
|
|
|
|
mxEvent={
|
|
|
|
Object {
|
|
|
|
"content": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
|
|
|
"org.matrix.msc3381.poll.start": Object {
|
|
|
|
"answers": Array [
|
|
|
|
Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
|
|
|
"question": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-18 01:06:30 +08:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-11-23 18:27:44 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<MPollBody
|
|
|
|
getRelationsForEvent={[Function]}
|
|
|
|
mxEvent={
|
|
|
|
Object {
|
|
|
|
"content": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
|
|
|
"org.matrix.msc3381.poll.start": Object {
|
|
|
|
"answers": Array [
|
|
|
|
Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
|
|
|
"question": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-18 01:06:30 +08:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-11-23 18:27:44 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody"
|
|
|
|
>
|
|
|
|
<h2>
|
|
|
|
What should we order for the party?
|
|
|
|
</h2>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_allOptions"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="pizza"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "pizza",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Pizza",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Pizza",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
2021-11-23 18:27:44 +08:00
|
|
|
checked={false}
|
2021-12-08 22:56:48 +08:00
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText="1 vote"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<StyledRadioButton
|
|
|
|
checked={false}
|
|
|
|
childrenInLabel={true}
|
|
|
|
className=""
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="pizza"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_StyledRadioButton_enabled"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="pizza"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-11-23 19:16:31 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 19:16:31 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Pizza
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
1 vote
|
|
|
|
</div>
|
2021-11-23 19:16:31 +08:00
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
</div>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "20%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="poutine"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "poutine",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Poutine",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Poutine",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
2021-11-23 18:27:44 +08:00
|
|
|
checked={false}
|
2021-12-08 22:56:48 +08:00
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText="0 votes"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<StyledRadioButton
|
|
|
|
checked={false}
|
|
|
|
childrenInLabel={true}
|
|
|
|
className=""
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="poutine"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_StyledRadioButton_enabled"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="poutine"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-11-23 19:16:31 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 19:16:31 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Poutine
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
|
|
|
</div>
|
2021-11-23 19:16:31 +08:00
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
</div>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "0%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option mx_MPollBody_option_checked"
|
|
|
|
key="italian"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "italian",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Italian",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Italian",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
2021-11-23 18:27:44 +08:00
|
|
|
checked={true}
|
2021-12-08 22:56:48 +08:00
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText="3 votes"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<StyledRadioButton
|
|
|
|
checked={true}
|
|
|
|
childrenInLabel={true}
|
|
|
|
className=""
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="italian"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_StyledRadioButton_enabled mx_StyledRadioButton_checked"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<input
|
|
|
|
checked={true}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="italian"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-11-23 19:16:31 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 19:16:31 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Italian
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
3 votes
|
|
|
|
</div>
|
2021-11-23 19:16:31 +08:00
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
</div>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "60%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="wings"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "wings",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Wings",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Wings",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
2021-11-23 18:27:44 +08:00
|
|
|
checked={false}
|
2021-12-08 22:56:48 +08:00
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText="1 vote"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<StyledRadioButton
|
|
|
|
checked={false}
|
|
|
|
childrenInLabel={true}
|
|
|
|
className=""
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="wings"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_StyledRadioButton_enabled"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="wings"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-11-23 19:16:31 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 19:16:31 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Wings
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
1 vote
|
|
|
|
</div>
|
2021-11-23 19:16:31 +08:00
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
</div>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "20%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_totalVotes"
|
|
|
|
>
|
|
|
|
Based on 5 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</MPollBody>
|
|
|
|
</Wrapper>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`MPollBody renders a poll with no votes 1`] = `
|
|
|
|
<Wrapper
|
|
|
|
getRelationsForEvent={[Function]}
|
|
|
|
mxEvent={
|
|
|
|
Object {
|
|
|
|
"content": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
|
|
|
"org.matrix.msc3381.poll.start": Object {
|
|
|
|
"answers": Array [
|
|
|
|
Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
|
|
|
"question": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-18 01:06:30 +08:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-11-23 18:27:44 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<MPollBody
|
|
|
|
getRelationsForEvent={[Function]}
|
|
|
|
mxEvent={
|
|
|
|
Object {
|
|
|
|
"content": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
|
|
|
"org.matrix.msc3381.poll.start": Object {
|
|
|
|
"answers": Array [
|
|
|
|
Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
|
|
|
"question": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-18 01:06:30 +08:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-11-23 18:27:44 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody"
|
|
|
|
>
|
|
|
|
<h2>
|
|
|
|
What should we order for the party?
|
|
|
|
</h2>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_allOptions"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="pizza"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "pizza",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Pizza",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Pizza",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
2021-11-23 18:27:44 +08:00
|
|
|
checked={false}
|
2021-12-08 22:56:48 +08:00
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText=""
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<StyledRadioButton
|
|
|
|
checked={false}
|
|
|
|
childrenInLabel={true}
|
|
|
|
className=""
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="pizza"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_StyledRadioButton_enabled"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="pizza"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-11-23 19:16:31 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 19:16:31 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Pizza
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
/>
|
2021-11-23 19:16:31 +08:00
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
</div>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
2021-12-08 22:56:48 +08:00
|
|
|
"width": "0%",
|
2021-11-23 18:27:44 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="poutine"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "poutine",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Poutine",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Poutine",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
2021-11-23 18:27:44 +08:00
|
|
|
checked={false}
|
2021-12-08 22:56:48 +08:00
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText=""
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<StyledRadioButton
|
|
|
|
checked={false}
|
|
|
|
childrenInLabel={true}
|
|
|
|
className=""
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="poutine"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_StyledRadioButton_enabled"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="poutine"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-11-23 19:16:31 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 19:16:31 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Poutine
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
/>
|
2021-11-23 19:16:31 +08:00
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
</div>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
2021-12-08 22:56:48 +08:00
|
|
|
"width": "0%",
|
2021-11-23 18:27:44 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="italian"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "italian",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Italian",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Italian",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
2021-11-23 18:27:44 +08:00
|
|
|
checked={false}
|
2021-12-08 22:56:48 +08:00
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText=""
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<StyledRadioButton
|
|
|
|
checked={false}
|
|
|
|
childrenInLabel={true}
|
|
|
|
className=""
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="italian"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_StyledRadioButton_enabled"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="italian"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-11-23 19:16:31 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 19:16:31 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Italian
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
/>
|
2021-11-23 19:16:31 +08:00
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
</div>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
2021-12-08 22:56:48 +08:00
|
|
|
"width": "0%",
|
2021-11-23 18:27:44 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="wings"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "wings",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Wings",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Wings",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
2021-11-23 18:27:44 +08:00
|
|
|
checked={false}
|
2021-12-08 22:56:48 +08:00
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText=""
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<StyledRadioButton
|
|
|
|
checked={false}
|
|
|
|
childrenInLabel={true}
|
|
|
|
className=""
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="wings"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_StyledRadioButton_enabled"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="wings"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-11-23 19:16:31 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 19:16:31 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Wings
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
/>
|
2021-11-23 19:16:31 +08:00
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
</div>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
2021-12-08 22:56:48 +08:00
|
|
|
"width": "0%",
|
2021-11-23 18:27:44 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_totalVotes"
|
|
|
|
>
|
2021-12-03 18:26:28 +08:00
|
|
|
No votes cast
|
2021-11-23 18:27:44 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</MPollBody>
|
|
|
|
</Wrapper>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`MPollBody renders a poll with only non-local votes 1`] = `
|
|
|
|
<Wrapper
|
|
|
|
getRelationsForEvent={[Function]}
|
|
|
|
mxEvent={
|
|
|
|
Object {
|
|
|
|
"content": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
|
|
|
"org.matrix.msc3381.poll.start": Object {
|
|
|
|
"answers": Array [
|
|
|
|
Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
|
|
|
"question": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-18 01:06:30 +08:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-11-23 18:27:44 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<MPollBody
|
|
|
|
getRelationsForEvent={[Function]}
|
|
|
|
mxEvent={
|
|
|
|
Object {
|
|
|
|
"content": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
|
|
|
"org.matrix.msc3381.poll.start": Object {
|
|
|
|
"answers": Array [
|
|
|
|
Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
|
|
|
"question": Object {
|
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-18 01:06:30 +08:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-11-23 18:27:44 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody"
|
|
|
|
>
|
|
|
|
<h2>
|
|
|
|
What should we order for the party?
|
|
|
|
</h2>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_allOptions"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="pizza"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "pizza",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Pizza",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Pizza",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
2021-11-23 18:27:44 +08:00
|
|
|
checked={false}
|
2021-12-08 22:56:48 +08:00
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText="0 votes"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<StyledRadioButton
|
|
|
|
checked={false}
|
|
|
|
childrenInLabel={true}
|
|
|
|
className=""
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="pizza"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_StyledRadioButton_enabled"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="pizza"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-11-23 19:16:31 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 19:16:31 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Pizza
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
|
|
|
</div>
|
2021-11-23 19:16:31 +08:00
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
</div>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "0%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="poutine"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "poutine",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Poutine",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Poutine",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
2021-11-23 18:27:44 +08:00
|
|
|
checked={false}
|
2021-12-08 22:56:48 +08:00
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText="0 votes"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<StyledRadioButton
|
|
|
|
checked={false}
|
|
|
|
childrenInLabel={true}
|
|
|
|
className=""
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="poutine"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_StyledRadioButton_enabled"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="poutine"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-11-23 19:16:31 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 19:16:31 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Poutine
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
|
|
|
</div>
|
2021-11-23 19:16:31 +08:00
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
</div>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "0%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="italian"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "italian",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Italian",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Italian",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
2021-11-23 18:27:44 +08:00
|
|
|
checked={false}
|
2021-12-08 22:56:48 +08:00
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText="2 votes"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<StyledRadioButton
|
|
|
|
checked={false}
|
|
|
|
childrenInLabel={true}
|
|
|
|
className=""
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="italian"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_StyledRadioButton_enabled"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="italian"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-11-23 19:16:31 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 19:16:31 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Italian
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
2 votes
|
|
|
|
</div>
|
2021-11-23 19:16:31 +08:00
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
</div>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "67%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
2021-12-03 18:26:28 +08:00
|
|
|
className="mx_MPollBody_option mx_MPollBody_option_checked"
|
2021-11-23 18:27:44 +08:00
|
|
|
key="wings"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
2022-01-18 01:06:30 +08:00
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
2021-12-08 22:56:48 +08:00
|
|
|
"id": "wings",
|
2022-01-18 01:06:30 +08:00
|
|
|
"renderings": Array [
|
|
|
|
Object {
|
|
|
|
"body": "Wings",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Wings",
|
|
|
|
"wireFormat": Object {
|
|
|
|
"content": Object {
|
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 22:56:48 +08:00
|
|
|
}
|
|
|
|
}
|
2021-12-03 18:26:28 +08:00
|
|
|
checked={true}
|
2021-12-08 22:56:48 +08:00
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText="1 vote"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<StyledRadioButton
|
|
|
|
checked={true}
|
|
|
|
childrenInLabel={true}
|
|
|
|
className=""
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="wings"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_StyledRadioButton_enabled mx_StyledRadioButton_checked"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<input
|
|
|
|
checked={true}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="wings"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 18:27:44 +08:00
|
|
|
>
|
2021-11-23 19:16:31 +08:00
|
|
|
<div
|
2021-12-08 22:56:48 +08:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 19:16:31 +08:00
|
|
|
>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Wings
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
1 vote
|
|
|
|
</div>
|
2021-11-23 19:16:31 +08:00
|
|
|
</div>
|
2021-11-23 18:27:44 +08:00
|
|
|
</div>
|
2021-12-08 22:56:48 +08:00
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
2021-11-23 18:27:44 +08:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
|
|
|
Object {
|
|
|
|
"width": "33%",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_totalVotes"
|
|
|
|
>
|
|
|
|
Based on 3 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</MPollBody>
|
|
|
|
</Wrapper>
|
|
|
|
`;
|