]> git.localhorst.tv Git - alttp.git/blob - resources/js/components/twitch-bot/CommandDialog.js
remove some useless svg groups
[alttp.git] / resources / js / components / twitch-bot / CommandDialog.js
1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { Modal } from 'react-bootstrap';
4 import { useTranslation } from 'react-i18next';
5
6 import CommandForm from './CommandForm';
7
8 const CommandDialog = ({
9         name,
10         onHide,
11         onSubmit,
12         settings,
13         show,
14 }) => {
15         const { t } = useTranslation();
16
17         return <Modal className="report-dialog" onHide={onHide} show={show}>
18                 <Modal.Header closeButton>
19                         <Modal.Title>
20                                 {t(name ? 'twitchBot.commandDialog' : 'twitchBot.addCommand')}
21                         </Modal.Title>
22                 </Modal.Header>
23                 <CommandForm
24                         name={name}
25                         onCancel={onHide}
26                         onSubmit={onSubmit}
27                         settings={settings}
28                 />
29         </Modal>;
30 };
31
32 CommandDialog.propTypes = {
33         name: PropTypes.string,
34         onHide: PropTypes.func,
35         onSubmit: PropTypes.func,
36         settings: PropTypes.shape({
37         }),
38         show: PropTypes.bool,
39 };
40
41 export default CommandDialog;