overleaf/services/web/frontend/js/features/hotkeys-modal/components/hotkeys-modal.js
Alf Eaton 771a39f267 Merge pull request #3441 from overleaf/3803-hotkeys-modal
Migrate hotkeys modal to React

GitOrigin-RevId: 78399d3d62771cd296bdc2f4f8b1083263d31551
2020-12-11 03:04:42 +00:00

26 lines
686 B
JavaScript

import React from 'react'
import { Modal } from 'react-bootstrap'
import PropTypes from 'prop-types'
import HotkeysModalContent from './hotkeys-modal-content'
function HotkeysModal({ handleHide, show, trackChangesVisible = false }) {
const isMac = /Mac/i.test(navigator.platform)
return (
<Modal bsSize="large" onHide={handleHide} show={show}>
<HotkeysModalContent
handleHide={handleHide}
isMac={isMac}
trackChangesVisible={trackChangesVisible}
/>
</Modal>
)
}
HotkeysModal.propTypes = {
handleHide: PropTypes.func.isRequired,
show: PropTypes.bool.isRequired,
trackChangesVisible: PropTypes.bool
}
export default HotkeysModal