import React from 'react';
import './TOD.Toggle.css';

const TODToggle = ({ value, onChange, label }) => {
  return (
    <div className="tod-toggle-wrapper">
      {label && <span className="tod-toggle-label">{label}</span>}
      <label className="tod-toggle">
        <input
          type="checkbox"
          checked={value}
          onChange={e => onChange(e.target.checked)}
        />
        <span className="tod-toggle-slider"></span>
      </label>
    </div>
  );
};

export default TODToggle; 