UNPKG

terriajs

Version:

Geospatial data visualization platform.

22 lines 717 B
import { jsx as _jsx } from "react/jsx-runtime"; import styled from "styled-components"; import { useViewState } from "../Context/ViewStateContext"; /** * A button as link that provides common styling for custom component types * that open a feature. */ const FeatureLink = ({ title, onClick, children }) => { const viewState = useViewState(); return (_jsx(ButtonAsLink, { title: title, onClick: (e) => { e.stopPropagation(); onClick(viewState); }, children: children })); }; const ButtonAsLink = styled.button ` background: none; border: none; text-decoration: underline dashed; color: inherit; `; export default FeatureLink; //# sourceMappingURL=FeatureLink.js.map