summaryrefslogtreecommitdiff
path: root/client/src/components/LabelCard/LabelCard.jsx
blob: dd02050c5d3e2031c7df9416ba288142282d02bc (plain)
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
import React from 'react'
import styles from './LabelCard.module.css'

const LabelCard = ({ id, name, value, title, image, onChange, readOnly }) => {
  return (
    <div className={styles.labelcard}>
      <label htmlFor={id} className={styles.card}>
        <img className={styles.card__image} src={image} alt="" />
        <h4 className={styles.card__title}>{title}</h4>
      </label>
      <input
        className={styles.labelcard__radio}
        type="radio"
        id={id}
        name={name}
        value={value}
        required
        onChange={onChange}
        disabled={readOnly}
      />
    </div>
  )
}

export default LabelCard