text: import React from 'react'
  import './toggle.css'
  
  const Toggle = ({ mode, onChange }) => {
    if (mode === null) return null
    return (
      <div className="toggle-theme">
        <label className="switch">
          <input
            className="switch__input"
            type="checkbox"
            checked={mode === 'light'}
            onChange={onChange}
          />
          <span className="switch__background">
            <span className="switch__toggle">
              <span className="switch__moon" />
            </span>
            <span className="switch__stars" />
            <span className="switch__clouds" />
          </span>
        </label>
      </div>
    )
  }
  
  export default Toggle
  