import { create, InstanceProps } from 'react-modal-promise' import { ActionButton } from './ActionButton' import { Logo } from './Logo' import { Marked } from '@ts-stack/markdown' type ModalResolve = { wantUpdate: boolean } type ModalReject = boolean type UpdaterModalProps = InstanceProps & { version: string date?: string body?: string } export const createUpdaterModal = create< UpdaterModalProps, ModalResolve, ModalReject > export const UpdaterModal = ({ onResolve, version, date, body, }: UpdaterModalProps) => (

New version available!

v{version} Published on {date}
{/* TODO: fix list bullets */} {body && (
)}
onResolve({ wantUpdate: 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-button-cancel" > Not now onResolve({ wantUpdate: true })} iconStart={{ icon: 'arrowRight', bgClassName: 'dark:bg-chalkboard-80', }} className="dark:hover:bg-chalkboard-80/50" data-testid="update-button-update" > Update
)