]> git.localhorst.tv Git - alttp.git/blob - resources/js/components/snes/SettingsDialog.js
svg dungeon tracker
[alttp.git] / resources / js / components / snes / SettingsDialog.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 SettingsForm from './SettingsForm';
7
8 const SettingsDialog = ({
9         deviceList,
10         onHide,
11         onSubmit,
12         settings,
13         show,
14 }) => {
15         const { t } = useTranslation();
16
17         return <Modal className="snes-settings-dialog" onHide={onHide} show={show}>
18                 <Modal.Header closeButton>
19                         <Modal.Title>
20                                 {t('snes.settings')}
21                         </Modal.Title>
22                 </Modal.Header>
23                 <SettingsForm
24                         deviceList={deviceList}
25                         onCancel={onHide}
26                         onSubmit={onSubmit}
27                         settings={settings}
28                 />
29         </Modal>;
30 };
31
32 SettingsDialog.propTypes = {
33         deviceList: PropTypes.arrayOf(PropTypes.string),
34         onHide: PropTypes.func,
35         onSubmit: PropTypes.func,
36         settings: PropTypes.shape({
37         }),
38         show: PropTypes.bool,
39 };
40
41 export default SettingsDialog;