'use client'

import React from 'react';

import style from './Toggle.module.scss'

interface Props {
    label: string
    handleClick: () => void
}

const Toggle: React.FC<Props> = (props) => {

    const { label, handleClick } = props

    return (
        <div className={style.toggleContainer}>
            <input onChange={handleClick} type="checkbox" role="switch" name='toggle' />
            <div className={style.label}>{label}</div>
        </div>
    );
};

export default Toggle;