blob: 6c3c6cb71f503626388a6fc3e92a3b31c7fb9891 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import PropTypes from 'prop-types'
import React from 'react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faPlus, faMinus } from '@fortawesome/free-solid-svg-icons'
const ZoomControlComponent = ({ zoomInOnCenter }) => {
return (
<span>
<button
className="btn btn-default btn-circle btn-sm mr-1"
title="Zoom in"
onClick={() => zoomInOnCenter(true)}
>
<FontAwesomeIcon icon={faPlus} />
</button>
<button
className="btn btn-default btn-circle btn-sm mr-1"
title="Zoom out"
onClick={() => zoomInOnCenter(false)}
>
<FontAwesomeIcon icon={faMinus} />
</button>
</span>
)
}
ZoomControlComponent.propTypes = {
zoomInOnCenter: PropTypes.func.isRequired,
}
export default ZoomControlComponent
|