Sha256: c7a599d1e8bd987470ceed30cfcee363b502ec39655b7ce7a5f9d78f414b0c35

Contents?: true

Size: 967 Bytes

Versions: 46

Compression:

Stored size: 967 Bytes

Contents

import React from 'react';
import { Save, AlertCircle, Loader2 } from 'lucide-react';

interface AutosaveIndicatorProps {
  saving: boolean;
  saved: boolean;
  error: string | null;
}

export function AutosaveIndicator({ saving, saved, error }: AutosaveIndicatorProps) {
  if (error) {
    return (
      <div className="flex items-center gap-2 text-red-600">
        <AlertCircle className="w-4 h-4" />
        <span className="text-sm font-medium">{error}</span>
      </div>
    );
  }

  if (saving) {
    return (
      <div className="flex items-center gap-2 text-blue-600">
        <Loader2 className="w-4 h-4 animate-spin" />
        <span className="text-sm font-medium">Saving changes...</span>
      </div>
    );
  }

  if (saved) {
    return (
      <div className="flex items-center gap-2 text-green-600">
        <Save className="w-4 h-4" />
        <span className="text-sm font-medium">Changes saved</span>
      </div>
    );
  }

  return null;
}

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
easy_ml-0.2.0.pre.rc47 app/frontend/components/dataset/AutosaveIndicator.tsx
easy_ml-0.2.0.pre.rc46 app/frontend/components/dataset/AutosaveIndicator.tsx
easy_ml-0.2.0.pre.rc45 app/frontend/components/dataset/AutosaveIndicator.tsx
easy_ml-0.2.0.pre.rc44 app/frontend/components/dataset/AutosaveIndicator.tsx
easy_ml-0.2.0.pre.rc43 app/frontend/components/dataset/AutosaveIndicator.tsx
easy_ml-0.2.0.pre.rc41 app/frontend/components/dataset/AutosaveIndicator.tsx
easy_ml-0.2.0.pre.rc40 app/frontend/components/dataset/AutosaveIndicator.tsx
easy_ml-0.2.0.pre.rc39 app/frontend/components/dataset/AutosaveIndicator.tsx
easy_ml-0.2.0.pre.rc38 app/frontend/components/dataset/AutosaveIndicator.tsx
easy_ml-0.2.0.pre.rc37 app/frontend/components/dataset/AutosaveIndicator.tsx
easy_ml-0.2.0.pre.rc36 app/frontend/components/dataset/AutosaveIndicator.tsx
easy_ml-0.2.0.pre.rc35 app/frontend/components/dataset/AutosaveIndicator.tsx
easy_ml-0.2.0.pre.rc34 app/frontend/components/dataset/AutosaveIndicator.tsx
easy_ml-0.2.0.pre.rc33 app/frontend/components/dataset/AutosaveIndicator.tsx
easy_ml-0.2.0.pre.rc32 app/frontend/components/dataset/AutosaveIndicator.tsx
easy_ml-0.2.0.pre.rc31 app/frontend/components/dataset/AutosaveIndicator.tsx
easy_ml-0.2.0.pre.rc30 app/frontend/components/dataset/AutosaveIndicator.tsx
easy_ml-0.2.0.pre.rc29 app/frontend/components/dataset/AutosaveIndicator.tsx
easy_ml-0.2.0.pre.rc28 app/frontend/components/dataset/AutosaveIndicator.tsx
easy_ml-0.2.0.pre.rc27 app/frontend/components/dataset/AutosaveIndicator.tsx