mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
771a39f267
Migrate hotkeys modal to React GitOrigin-RevId: 78399d3d62771cd296bdc2f4f8b1083263d31551
26 lines
686 B
JavaScript
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
|