import { create, InstanceProps } from 'react-modal-promise' import { ActionButton } from './ActionButton' type ModalResolve = { wantRestart: boolean } type ModalReject = boolean type UpdaterRestartModalProps = InstanceProps & { version: string } export const createUpdaterRestartModal = create< UpdaterRestartModalProps, ModalResolve, ModalReject > export const UpdaterRestartModal = ({ onResolve, version, }: UpdaterRestartModalProps) => (

Ready to restart?

v{version} is now installed. Restart the app to use the new features.

onResolve({ wantRestart: false })} iconStart={{ icon: 'close', bgClassName: 'bg-destroy-80', iconClassName: 'text-destroy-20 group-hover:text-destroy-10', }} className="hover:border-destroy-40 hover:bg-destroy-10/50 dark:hover:bg-destroy-80/50" data-testid="update-restrart-button-cancel" > Not now onResolve({ wantRestart: true })} iconStart={{ icon: 'arrowRight', bgClassName: 'dark:bg-chalkboard-80', }} className="dark:hover:bg-chalkboard-80/50" data-testid="update-restrart-button-update" > Restart
)