src/components/Poll.js
/**
 * Reusable poll component. Using the choices and questions provided
 * by the user, creates a end-to-end poll that allows users to vote
 * and subsequently see the current votes in the poll.
 */
Reusable poll component. Using the choices and questions provided
by the user, creates a end-to-end poll that allows users to vote
and subsequently see the current votes in the poll.
Reusable poll component . Using the choices and questions provided by the user creates a end - to - end poll that allows users to vote and subsequently see the current votes in the poll .
function Poll({ choices, pollQuestion, submitText }) {
  return (
    <Jumbotron className="highLevel d-flex justify-content-center align-items-center">
      <Jumbotron className="pollHolder">
        <h3>{pollQuestion}</h3>
        <RadioPoll choices={choices}
                   pollQuestion={pollQuestion}
                   submitText={submitText}>
        </RadioPoll>
      </Jumbotron>
    </Jumbotron>
  );
}
function Poll ( { choices , pollQuestion , submitText } ) { return ( < Jumbotron className = "highLevel d-flex justify-content-center align-items-center" > < Jumbotron className = "pollHolder" > < h3 > { pollQuestion } < / h3 > < RadioPoll choices = { choices } pollQuestion = { pollQuestion } submitText = { submitText } > < / RadioPoll > < / Jumbotron > < / Jumbotron > ) ; }
Reusable poll component.
Reusable poll component .
// 'd-flex' - flexbox for bootstrap 4 // 'justify-content-center' - center content vertically in Jumbotron // 'align-items-center' - center content horizontally in Jumbotron