diff options
Diffstat (limited to 'opendc-web/opendc-web-server/src/main/webui/components/topologies/map/controls/Toolbar.js')
| -rw-r--r-- | opendc-web/opendc-web-server/src/main/webui/components/topologies/map/controls/Toolbar.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/opendc-web/opendc-web-server/src/main/webui/components/topologies/map/controls/Toolbar.js b/opendc-web/opendc-web-server/src/main/webui/components/topologies/map/controls/Toolbar.js new file mode 100644 index 00000000..00aaf3e1 --- /dev/null +++ b/opendc-web/opendc-web-server/src/main/webui/components/topologies/map/controls/Toolbar.js @@ -0,0 +1,33 @@ +import PropTypes from 'prop-types' +import React from 'react' +import { control, toolBar } from './Toolbar.module.css' +import { Button } from '@patternfly/react-core' +import { SearchPlusIcon, SearchMinusIcon, CameraIcon } from '@patternfly/react-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} + > + <CameraIcon /> + </Button> + </div> + ) +} + +Toolbar.propTypes = { + onZoom: PropTypes.func, + onExport: PropTypes.func, +} + +export default Toolbar |
