import { Modal } from '@patternfly/react-core/dist/js/components/Modal';
import React from 'react';

interface IProps {
    isOpen: boolean;
    login: () => void;
}

export default function SessionExpiredModal(props: IProps) {
    return (<Modal
        title="Your session has expired!"
        ariaDescribedById="session-expired-description"
        isOpen={props.isOpen}
        actions={[<button key="confirm" onClick={props.login} className="btn btn-app btn-primary">Log back in</button>]}>
        <p id="session-expired-description">No worries, simply log back in with the button below.</p>
    </Modal>);
}
