blob: 469fd5154232841e83d7e41aeb99c9493d1024c3 (
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
32
33
34
35
|
import PropTypes from 'prop-types'
import React from 'react'
import { control, toolBar } from './Toolbar.module.scss'
import { Button } from '@patternfly/react-core'
import { SearchPlusIcon, SearchMinusIcon } from '@patternfly/react-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faCamera } from '@fortawesome/free-solid-svg-icons'
function Toolbar({ onZoom, onExport }) {
return (
<div className={toolBar}>
<Button variant="tertiary" title="Zoom in" onClick={() => onZoom(true)} className={control}>
<SearchPlusIcon />
</Button>
<Button variant="tertiary" title="Zoom out" onClick={() => onZoom(false)} className={control}>
<SearchMinusIcon />
</Button>
<Button
variant="tertiary"
title="Export Canvas to PNG Image"
onClick={() => onExport()}
className={control}
>
<FontAwesomeIcon icon={faCamera} />
</Button>
</div>
)
}
Toolbar.propTypes = {
onZoom: PropTypes.func,
onExport: PropTypes.func,
}
export default Toolbar
|