UNPKG

@open-tender/ui

Version:

A component library for use with the Open Tender web app

15 lines (14 loc) 791 B
import React from 'react'; import { makeProps } from '../utils'; import Button from './Button'; import ModalContent from './ModalContent'; import View from './View'; const IdleModal = ({ config, handlers, modalContentConfig }) => { const { idleModal__title } = config; const title = idleModal__title.props.text || 'Are you still there?'; return (React.createElement(ModalContent, { config: modalContentConfig, title: title }, React.createElement(View, Object.assign({}, makeProps(config, 'idleModal__content')), React.createElement(View, Object.assign({}, makeProps(config, 'idleModal__error')), React.createElement(Button, Object.assign({}, makeProps(config, 'idleModal__yes'), { onClick: handlers.close })))))); }; export default IdleModal;