import styles from "./styles.module.scss";

interface ICheckboxProps {
  id: string;
  name: string;
  active: boolean;
}

function Checkbox({ id, name, active }: ICheckboxProps) {
  return (
    <>
      <input
        type="checkbox"
        id={id}
        name={name}
        className={styles["checkbox-input"]}
      />
      <label
        className={`${styles["checkbox-label"]} ${active ? styles.active : ""}`}
        htmlFor={id}
      >
        <span className={styles["checkbox-content"]} />
      </label>
    </>
  );
}

export default Checkbox;
