terriajs
Version:
Geospatial data visualization platform.
15 lines • 773 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import classNames from "classnames";
import Icon from "../../../Styled/Icon";
import Styles from "./menu-button.scss";
/**
* Basic button for use in the menu part at the top of the map.
*/
const MenuButton = ({ href = "#", caption }) => {
const target = href !== "#" ? "_blank" : undefined;
const rel = target === "_blank" ? "noreferrer" : undefined;
return (_jsxs("a", { className: classNames(Styles.btnAboutLink), href: href, target: target, rel: rel, title: caption, children: [href !== "#" && _jsx(Icon, { glyph: Icon.GLYPHS.externalLink }), _jsx("span", { children: caption })] }));
};
MenuButton.displayName = "MenuButton";
export default MenuButton;
//# sourceMappingURL=MenuButton.js.map