diff options
Diffstat (limited to 'client/src/components/LabelCard')
-rw-r--r-- | client/src/components/LabelCard/LabelCard.jsx | 23 | ||||
-rw-r--r-- | client/src/components/LabelCard/LabelCard.module.css | 19 |
2 files changed, 42 insertions, 0 deletions
diff --git a/client/src/components/LabelCard/LabelCard.jsx b/client/src/components/LabelCard/LabelCard.jsx new file mode 100644 index 0000000..be02f01 --- /dev/null +++ b/client/src/components/LabelCard/LabelCard.jsx @@ -0,0 +1,23 @@ +import React from 'react' +import styles from './LabelCard.module.css' + +const LabelCard = ({ id, name, value, title, image }) => { + 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 + /> + </div> + ) +} + +export default LabelCard diff --git a/client/src/components/LabelCard/LabelCard.module.css b/client/src/components/LabelCard/LabelCard.module.css new file mode 100644 index 0000000..8511596 --- /dev/null +++ b/client/src/components/LabelCard/LabelCard.module.css @@ -0,0 +1,19 @@ +.labelcard { + text-align: center; +} + +.card { + display: flex; + flex-direction: column; + align-items: center; + margin: 5px; +} + +.card__image { + border: 3px solid var(--color-black); + border-radius: 10px; +} + +.card__title { + margin: 5px 0px; +} |