1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { Button, Form } from 'react-bootstrap';
4 import { useTranslation } from 'react-i18next';
6 import { useOpenSeadragon } from './OpenSeadragon';
8 const Buttons = ({ setUWOverlay, uwOverlay }) => {
9 const { activeMap, setActiveMap } = useOpenSeadragon();
10 const { t } = useTranslation();
12 return <div className="mt-5">
13 <div className="button-bar">
14 {['lw', 'dw', 'sp', 'uw'].map(map =>
16 active={activeMap === map}
18 onClick={() => setActiveMap(map)}
19 title={t(`map.${map}Long`)}
20 variant="outline-secondary"
22 {t(`map.${map}Short`)}
27 <div className="mt-2">
30 id="toggle-uw-overlay"
32 onChange={e => setUWOverlay(e.target.checked)}
35 <Form.Label className="mt-0" htmlFor="toggle-uw-overlay">
44 setUWOverlay: PropTypes.func,
45 uwOverlay: PropTypes.bool,
48 export default Buttons;