diff --git a/src/components/Doc.tsx b/src/components/Doc.tsx index c0fa40fe..6a5949b9 100644 --- a/src/components/Doc.tsx +++ b/src/components/Doc.tsx @@ -18,14 +18,15 @@ type DocProps = { 'sdk-support'?: { [key: string]: typeof headers } + docUrl?: string } -}; +}; // & WithTranslation? export default class Doc extends React.Component { render () { const {fieldSpec} = this.props; - const {doc, values} = fieldSpec; + const {doc, values, docUrl} = fieldSpec; const sdkSupport = fieldSpec['sdk-support']; const renderValues = ( @@ -85,7 +86,12 @@ export default class Doc extends React.Component { } + {docUrl && +
+ console.log('Link clicked')}>Learn More (TODO i18n) +
+ } ); } -} \ No newline at end of file +} diff --git a/src/components/ModalExport.tsx b/src/components/ModalExport.tsx index f3c85783..1fa6b32b 100644 --- a/src/components/ModalExport.tsx +++ b/src/components/ModalExport.tsx @@ -116,13 +116,6 @@ class ModalExportInternal extends React.Component {

{t("Download a JSON style to your computer.")}

-

- MapTiler,  - ThunderForest, - and Stadia Maps  - may require access keys or other authentication to access map tiles. - Refer to their documentation for details. -

({ maputnik: { maptiler_access_token: { label: t("MapTiler Access Token"), - doc: t("Public access token for MapTiler Cloud.") + doc: t("Public access token for MapTiler Cloud."), + docUrl: "https://docs.maptiler.com/cloud/api/authentication-key/" }, thunderforest_access_token: { label: t("Thunderforest Access Token"), - doc: t("Public access token for Thunderforest services.") + doc: t("Public access token for Thunderforest services."), + docUrl: "https://www.thunderforest.com/docs/apikeys/", }, stadia_access_token: { label: t("Stadia Maps API Key"), - doc: t("API key for Stadia Maps.") + doc: t("API key for Stadia Maps."), + docUrl: "https://docs.stadiamaps.com/authentication/", }, style_renderer: { label: t("Style Renderer"), - doc: t("Choose the default Maputnik renderer for this style."), + doc: t("Choose the default Maputnik renderer for this style.") }, } })