mirror of
https://github.com/maputnik/editor.git
synced 2026-07-30 01:37:27 +00:00
Refactor after discussion
This commit is contained in:
@@ -19,7 +19,7 @@ type DocProps = {
|
|||||||
[key: string]: typeof headers
|
[key: string]: typeof headers
|
||||||
}
|
}
|
||||||
docUrl?: string,
|
docUrl?: string,
|
||||||
docUrlDescription?: string
|
docUrlLinkText?: string
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ export default class Doc extends React.Component<DocProps> {
|
|||||||
render () {
|
render () {
|
||||||
const {fieldSpec} = this.props;
|
const {fieldSpec} = this.props;
|
||||||
|
|
||||||
const {doc, values, docUrl, docUrlDescription} = fieldSpec;
|
const {doc, values, docUrl, docUrlLinkText} = fieldSpec;
|
||||||
const sdkSupport = fieldSpec['sdk-support'];
|
const sdkSupport = fieldSpec['sdk-support'];
|
||||||
|
|
||||||
const renderValues = (
|
const renderValues = (
|
||||||
@@ -87,9 +87,9 @@ export default class Doc extends React.Component<DocProps> {
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
{docUrl && docUrlDescription &&
|
{docUrl && docUrlLinkText &&
|
||||||
<div className="SpecDoc__learn-more">
|
<div className="SpecDoc__learn-more">
|
||||||
<a href={docUrl} target="_blank" rel="noreferrer">{docUrlDescription}</a>
|
<a href={docUrl} target="_blank" rel="noreferrer">{docUrlLinkText}</a>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -6,19 +6,19 @@ const spec = (t: TFunction) => ({
|
|||||||
label: t("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/",
|
docUrl: "https://docs.maptiler.com/cloud/api/authentication-key/",
|
||||||
docUrlDescription: t("Learn More")
|
docUrlLinkText: t("Learn More")
|
||||||
},
|
},
|
||||||
thunderforest_access_token: {
|
thunderforest_access_token: {
|
||||||
label: t("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/",
|
docUrl: "https://www.thunderforest.com/docs/apikeys/",
|
||||||
docUrlDescription: t("Learn More")
|
docUrlLinkText: t("Learn More")
|
||||||
},
|
},
|
||||||
stadia_access_token: {
|
stadia_access_token: {
|
||||||
label: t("Stadia Maps API Key"),
|
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/",
|
docUrl: "https://docs.stadiamaps.com/authentication/",
|
||||||
docUrlDescription: t("Learn More")
|
docUrlLinkText: t("Learn More")
|
||||||
},
|
},
|
||||||
style_renderer: {
|
style_renderer: {
|
||||||
label: t("Style Renderer"),
|
label: t("Style Renderer"),
|
||||||
|
|||||||
Reference in New Issue
Block a user