mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
73bc3418a2
GitOrigin-RevId: fcc88a362c3e97c9fddf85d47c3a83a0a0b89432
38 lines
1,010 B
JavaScript
38 lines
1,010 B
JavaScript
import { ButtonGroup } from 'react-bootstrap'
|
|
import PropTypes from 'prop-types'
|
|
import Button from 'react-bootstrap/lib/Button'
|
|
import Icon from '../../../shared/components/icon'
|
|
import { memo } from 'react'
|
|
|
|
function PdfViewerControls({ setZoom }) {
|
|
return (
|
|
<ButtonGroup>
|
|
<Button
|
|
bsStyle="info"
|
|
bsSize="large"
|
|
onClick={() => setZoom('fit-width')}
|
|
>
|
|
<Icon type="arrows-h" />
|
|
</Button>
|
|
<Button
|
|
bsStyle="info"
|
|
bsSize="large"
|
|
onClick={() => setZoom('fit-height')}
|
|
>
|
|
<Icon type="arrows-v" />
|
|
</Button>
|
|
<Button bsStyle="info" bsSize="large" onClick={() => setZoom('zoom-in')}>
|
|
<Icon type="search-plus" />
|
|
</Button>
|
|
<Button bsStyle="info" bsSize="large" onClick={() => setZoom('zoom-out')}>
|
|
<Icon type="search-minus" />
|
|
</Button>
|
|
</ButtonGroup>
|
|
)
|
|
}
|
|
|
|
PdfViewerControls.propTypes = {
|
|
setZoom: PropTypes.func.isRequired,
|
|
}
|
|
|
|
export default memo(PdfViewerControls)
|