open moment formatting guide when clicking on the question mark in the time format table component

pull/3049/head
Iris Scholten 2018-03-23 15:24:22 -07:00
parent dd9cb18587
commit 07f7824f0c
1 changed files with 8 additions and 6 deletions

View File

@ -51,8 +51,8 @@ class GraphOptionsTimeFormat extends PureComponent<Props, State> {
public render() {
const {format, customFormat} = this.state
const tipContent =
'For information on formatting, see http://momentjs.com/docs/#/parsing/string-format/'
const tipUrl = 'http://momentjs.com/docs/#/parsing/string-format/'
const tipContent = `For information on formatting, see ${tipUrl}`
const formatOption = FORMAT_OPTIONS.find(op => op.text === format)
const showCustom = !formatOption || customFormat
@ -62,10 +62,12 @@ class GraphOptionsTimeFormat extends PureComponent<Props, State> {
<label>
Time Format
{showCustom && (
<QuestionMarkTooltip
tipID="Time Axis Format"
tipContent={tipContent}
/>
<a href={tipUrl} target="_blank">
<QuestionMarkTooltip
tipID="Time Axis Format"
tipContent={tipContent}
/>
</a>
)}
</label>
<Dropdown