Add help link

This commit is contained in:
Lukas Martinelli 2016-12-22 11:37:32 +01:00
parent fbdc87f2f1
commit 9f7aeca1c5

View file

@ -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>
} }
} }