import React from 'react';
import { Switch } from 'antd';

const ToggleSwitch = ({ checked, onChange, disabled = false, size = 'default' }) => {
  return (
    <Switch
      checked={checked}
      onChange={onChange}
      disabled={disabled}
      size={size === 'medium' ? 'default' : size}
    />
  );
};

export default ToggleSwitch;
