bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/polling/component.jsx
2016-05-20 10:46:30 -03:00

21 lines
543 B
JavaScript
Executable File

import React from 'react';
import Button from '../button/component';
export default class PollingComponent extends React.Component {
render() {
const poll = this.props.poll;
return (
<div>
{poll.answers.map((pollAnswer, index) => {
return (
<Button className="button mediumFont" key={index}
onClick={() => this.props.handleVote(poll.pollId, pollAnswer)} componentClass="span">
{pollAnswer.key}
</Button>
);
})}
</div>
);
}
};