summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/components/app/map/controls/ZoomControlComponent.js
blob: 6bae792c761fb16ccfc772a128ce1c13bd4f46db (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
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>
    )
}

export default ZoomControlComponent