2022-12-06 04:41:32 -05:00
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import './data-switcher.css';
|
|
|
|
|
|
|
|
interface DataLayerSwitcherProps {
|
|
|
|
currentDisplay: string;
|
|
|
|
onSubmit: (e: React.FormEvent<HTMLFormElement>) => void;
|
|
|
|
}
|
|
|
|
|
|
|
|
const DataLayerSwitcher: React.FC<DataLayerSwitcherProps> = (props) => (
|
|
|
|
<form className={`data-switcher ${props.currentDisplay}`} onSubmit={props.onSubmit}>
|
|
|
|
<button className="btn btn-outline btn-outline-dark"
|
|
|
|
type="submit">
|
2022-12-06 05:23:10 -05:00
|
|
|
{(props.currentDisplay === 'enabled')? 'Hide layer options' : 'Show layer options'}
|
2022-12-06 04:41:32 -05:00
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
);
|
|
|
|
|
|
|
|
export default DataLayerSwitcher;
|