/* eslint-disable lines-around-comment */ import { Checkbox } from '@atlaskit/checkbox'; import { makeStyles } from '@material-ui/styles'; import React from 'react'; import Button from '../../../base/ui/components/web/Button'; import { BUTTON_TYPES } from '../../../base/ui/constants'; import { Theme } from '../../../base/ui/types'; // @ts-ignore import { isSubmitAnswerDisabled } from '../../functions'; // @ts-ignore import AbstractPollAnswer from '../AbstractPollAnswer'; // @ts-ignore import type { AbstractProps } from '../AbstractPollAnswer'; const useStyles = makeStyles((theme: Theme) => { return { buttonMargin: { marginRight: `${theme.spacing(2)}px` } }; }); const PollAnswer = ({ creatorName, checkBoxStates, poll, setCheckbox, skipAnswer, skipChangeVote, submitAnswer, t }: AbstractProps) => { const { changingVote } = poll; const styles = useStyles(); return (
{ poll.question }
{ t('polls.by', { name: creatorName }) }
    { poll.answers.map((answer: any, index: number) => (
  1. { answer.name } } // eslint-disable-next-line react/jsx-no-bind onChange = { ev => setCheckbox(index, ev.target.checked) } size = 'large' />
  2. )) }
); }; /* * We apply AbstractPollAnswer to fill in the AbstractProps common * to both the web and native implementations. */ // eslint-disable-next-line new-cap export default AbstractPollAnswer(PollAnswer);