All files / src/pages/TagCreator AffilationQuestionSection.js

100% Statements 2/2
100% Branches 0/0
100% Functions 1/1
100% Lines 2/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35          61x 86x                                                        
import React from 'react';
import Radio from '@material-ui/core/Radio';
import Grid from '@material-ui/core/Grid';
import Typography from '@material-ui/core/Typography'
 
export const AffiliationQuestionSection = ({ value,handleChange,question }) => {
  return (
    <>
      <Grid container style={{ paddingTop: '30px' }}>
        <Grid item xs={12} sm={8} style={{ padding: '10px' }}><Typography variant='h6' style={{ fontWeight:'500' }}>{question}</Typography></Grid>
        <Grid item  xs={4} sm={8}>
          <Radio
            checked={value === 'yes'}
            data-cy='radio-yes'
            onChange={handleChange}
            value="yes"
            name="yes"
            inputProps={{ 'aria-label': 'true' }}
          /> Yes
        </Grid>
        <Grid item xs={4} sm={8}>
          <Radio
            checked={value === 'no'}
            data-cy='radio-no'
            onChange={handleChange}
            value="no"
            name="no"
            inputProps={{ 'aria-label': 'false' }}
          /> No
        </Grid>
      </Grid>
    </>
  )
}