8b6a4f7712
- Remove conflicting .dialog/.dialog-body rules from utilities.css - Fix live-session sidebar alignment and padding - Wrap ProjectDialog, RepositoryCreateDialog, WorkspacesPage modals in .dialog-header/.dialog-body - Migrate SessionsPage dirty-delete modal from .modal-* to .dialog-* - Add padding to .project-card - Fix session-card-actions border token (var(--border)) - Remove duplicate .dialog-actions rule in global.css - Add pb-20 bottom clearance to ConfigProfile/ToolType editor scroll containers - Add .card-md padding to ErrorState
35 lines
770 B
TypeScript
35 lines
770 B
TypeScript
import { Icon } from "./icon";
|
|
|
|
interface LoadingStateProps {
|
|
message?: string;
|
|
}
|
|
|
|
export const LoadingState = ({ message = "Loading..." }: LoadingStateProps) => (
|
|
<p className="muted">{message}</p>
|
|
);
|
|
|
|
interface ErrorStateProps {
|
|
message?: string;
|
|
onRetry?: () => void;
|
|
}
|
|
|
|
export const ErrorState = ({ message = "Failed to load", onRetry }: ErrorStateProps) => (
|
|
<div className="card card-md stack">
|
|
<p>{message}</p>
|
|
{onRetry && (
|
|
<button className="secondary-button" onClick={onRetry} type="button">
|
|
<Icon name="refresh" size="sm" />
|
|
Retry
|
|
</button>
|
|
)}
|
|
</div>
|
|
);
|
|
|
|
interface EmptyStateProps {
|
|
message: string;
|
|
}
|
|
|
|
export const EmptyState = ({ message }: EmptyStateProps) => (
|
|
<p className="muted">{message}</p>
|
|
);
|