Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

503 B
Raw Blame
import { Switch } from '@lobehub/ui';
import { memo } from 'react';

interface ContextCachingSwitchProps {
  disabled?: boolean;
  onChange?: (value: boolean) => void;
  value?: boolean;
}

const ContextCachingSwitch = memo<ContextCachingSwitchProps>(({ disabled, value, onChange }) => {
  return (
    <Switch
      disabled={disabled}
      size={'small'}
      value={!value}
      onChange={(checked) => {
        onChange?.(!checked);
      }}
    />
  );
});

export default ContextCachingSwitch;