mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-14 17:03:31 +01:00
Add help link
This commit is contained in:
parent
fbdc87f2f1
commit
9f7aeca1c5
1 changed files with 22 additions and 17 deletions
|
@ -27,12 +27,28 @@ const IconText = props => <span style={{ paddingLeft: margins[0] }}>
|
||||||
{props.children}
|
{props.children}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
const actionStyle = {
|
||||||
|
display: "inline-block",
|
||||||
|
padding: margins[1],
|
||||||
|
fontSize: fontSizes[4],
|
||||||
|
cursor: "pointer",
|
||||||
|
color: colors.white,
|
||||||
|
textDecoration: 'none',
|
||||||
|
}
|
||||||
|
|
||||||
|
const ToolbarLink = props => <a
|
||||||
|
href={props.href}
|
||||||
|
target={"blank"}
|
||||||
|
style={{
|
||||||
|
...actionStyle,
|
||||||
|
...props.style,
|
||||||
|
}}>
|
||||||
|
{props.children}
|
||||||
|
</a>
|
||||||
|
|
||||||
const ToolbarAction = props => <a onClick={props.onClick}
|
const ToolbarAction = props => <a onClick={props.onClick}
|
||||||
style={{
|
style={{
|
||||||
display: "inline-block",
|
...actionStyle,
|
||||||
padding: margins[1],
|
|
||||||
fontSize: fontSizes[4],
|
|
||||||
cursor: "pointer",
|
|
||||||
...props.style,
|
...props.style,
|
||||||
}}>
|
}}>
|
||||||
{props.children}
|
{props.children}
|
||||||
|
@ -60,16 +76,6 @@ export default class Toolbar extends React.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
saveButton() {
|
|
||||||
if(this.props.mapStyle.layers.length > 0) {
|
|
||||||
return <ToolbarAction onClick={this.props.onStyleSave} big={true}>
|
|
||||||
<MdSave />
|
|
||||||
<IconText>Save</IconText>
|
|
||||||
</ToolbarAction>
|
|
||||||
}
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
downloadButton() {
|
downloadButton() {
|
||||||
return <ToolbarAction onClick={this.props.onStyleDownload} big={true}>
|
return <ToolbarAction onClick={this.props.onStyleDownload} big={true}>
|
||||||
<MdFileDownload />
|
<MdFileDownload />
|
||||||
|
@ -128,7 +134,6 @@ export default class Toolbar extends React.Component {
|
||||||
<IconText>Open</IconText>
|
<IconText>Open</IconText>
|
||||||
</ToolbarAction>
|
</ToolbarAction>
|
||||||
{this.downloadButton()}
|
{this.downloadButton()}
|
||||||
{this.saveButton()}
|
|
||||||
<ToolbarAction onClick={this.toggleSources.bind(this)}>
|
<ToolbarAction onClick={this.toggleSources.bind(this)}>
|
||||||
<MdLayers />
|
<MdLayers />
|
||||||
<IconText>Sources</IconText>
|
<IconText>Sources</IconText>
|
||||||
|
@ -141,10 +146,10 @@ export default class Toolbar extends React.Component {
|
||||||
<MdFindInPage />
|
<MdFindInPage />
|
||||||
<IconText>Inspect</IconText>
|
<IconText>Inspect</IconText>
|
||||||
</ToolbarAction>
|
</ToolbarAction>
|
||||||
<ToolbarAction onClick={this.props.onOpenAbout}>
|
<ToolbarLink href={"https://github.com/maputnik/editor/wiki"}>
|
||||||
<MdHelpOutline />
|
<MdHelpOutline />
|
||||||
<IconText>Help</IconText>
|
<IconText>Help</IconText>
|
||||||
</ToolbarAction>
|
</ToolbarLink>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue