mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-06 20:14:20 -07:00
Zoom button styling does not match spec // General custom controls fix (#357)
This commit is contained in:
parent
cfce0dc826
commit
dbf1ae2ad8
19 changed files with 31006 additions and 294 deletions
26
client/src/components/territoryFocusControl.tsx
Normal file
26
client/src/components/territoryFocusControl.tsx
Normal file
|
@ -0,0 +1,26 @@
|
|||
import React, {MouseEventHandler} from 'react';
|
||||
import {_useMapControl as useMapControl} from 'react-map-gl';
|
||||
import * as styles from './territoryFocusControl.module.scss';
|
||||
|
||||
interface ITerritoryFocusControl {
|
||||
onClickTerritoryFocusButton : MouseEventHandler<HTMLButtonElement>;
|
||||
}
|
||||
|
||||
const TerritoryFocusControl = ({onClickTerritoryFocusButton} : ITerritoryFocusControl) => {
|
||||
const {containerRef} = useMapControl({
|
||||
// @ts-ignore // Types have not caught up yet, see https://github.com/visgl/react-map-gl/issues/1492
|
||||
onClick: onClickTerritoryFocusButton,
|
||||
});
|
||||
|
||||
return (
|
||||
<div ref={containerRef} className={styles.territoryFocusContainer}>
|
||||
<button id={'48'} onClick={onClickTerritoryFocusButton} className={styles.territoryFocusButton}>48</button>
|
||||
<button id={'AK'} onClick={onClickTerritoryFocusButton} className={styles.territoryFocusButton}>AK</button>
|
||||
<button id={'HI'} onClick={onClickTerritoryFocusButton} className={styles.territoryFocusButton}>HI</button>
|
||||
<button id={'PR'} onClick={onClickTerritoryFocusButton} className={styles.territoryFocusButton}>PR</button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default TerritoryFocusControl;
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue