import { Button } from "antd"; import { Callback, NLView } from "../types"; import { IndeterminateProgress } from "./IndeterminateProgress"; import { useAppState } from "../overmind"; export const ProgressButton: NLView<{ actionName: string; type?: "link" | "text" | "ghost" | "default" | "primary" | "dashed" | undefined; htmlType?: "button" | "submit" | "reset" | undefined; className?: string; onClick?: Callback; disabled?: boolean; disabledWhileProgress?: boolean; isErrorSubmit?: boolean; progressText?: string; id?: string; }> = ({ actionName, id, type, htmlType, className, children, onClick, disabled, isErrorSubmit, progressText, disabledWhileProgress, }) => { const state = useAppState(); const ival = !!state.indicators.specific[actionName]; return ( <> {/* */} {/* {!ival ? ( */} {/* ) : ( )} */} ); };