UNPKG

@open-tender/ui

Version:

A component library for use with the Open Tender web app

17 lines (16 loc) 847 B
import { Refresh } from 'iconoir-react'; import React from 'react'; import { makeProps } from '../utils'; import Button from './Button'; import Text from './Text'; import View from './View'; const CancelButton = ({ config, handlers }) => { if (!handlers.startOver) return null; return (React.createElement(View, Object.assign({}, makeProps(config, 'cancelButton')), React.createElement(Button, Object.assign({}, makeProps(config, 'cancelButton__button'), { onClick: handlers.startOver }), React.createElement(View, Object.assign({}, makeProps(config, 'cancelButton__buttonIcon')), React.createElement(Refresh, { width: 20, height: 20, strokeWidth: 2 })), React.createElement(Text, Object.assign({}, makeProps(config, 'cancelButton__buttonText')))))); }; export default CancelButton;