@shutootaki/gwm
Version:
git worktree manager CLI
56 lines • 1.37 kB
TypeScript
import React from 'react';
/** Progress information */
export interface Progress {
current: number;
total: number;
detail?: string;
}
/** Idle state (renders nothing) */
interface IdleState {
status: 'idle';
}
/** Loading state */
interface LoadingState {
status: 'loading';
message?: string;
progress?: Progress;
}
/** Success state */
interface SuccessState {
status: 'success';
title?: string;
messages?: string | string[];
}
/** Error state */
interface ErrorState {
status: 'error';
title?: string;
message?: string;
helpText?: string | string[];
}
/** Operation result state (discriminated union) */
export type OperationResultProps = IdleState | LoadingState | SuccessState | ErrorState;
/**
* 操作結果の統一表示コンポーネント
*
* 使用例:
* <OperationResult status="idle" />
*
* <OperationResult status="loading" message="Processing..." />
*
* <OperationResult
* status="success"
* title="Operation completed!"
* messages={['File created', 'Changes applied']}
* />
*
* <OperationResult
* status="error"
* title="Failed to process"
* message="Permission denied"
* helpText="Check file permissions"
* />
*/
export declare const OperationResult: React.FC<OperationResultProps>;
export {};
//# sourceMappingURL=OperationResult.d.ts.map