1
1
// Libraries
2
2
import React , { FC , useContext } from 'react'
3
- import { Page } from '@influxdata/clockface'
3
+ import {
4
+ Page ,
5
+ Grid ,
6
+ Button ,
7
+ IconFont ,
8
+ ComponentColor ,
9
+ ButtonShape ,
10
+ ComponentSize ,
11
+ Columns ,
12
+ } from '@influxdata/clockface'
4
13
5
14
// Contexts
6
15
import { FlowContext } from 'src/flows/context/flow.current'
@@ -11,13 +20,44 @@ import TimeRangeLabel from 'src/flows/components/header/TimeRangeLabel'
11
20
12
21
import { DEFAULT_PROJECT_NAME } from 'src/flows'
13
22
23
+ import './ReadOnlyHeader.scss'
24
+
14
25
const ReadOnlyHeader : FC = ( ) => {
15
26
const { flow} = useContext ( FlowContext )
16
27
28
+ const handleSignUpClick = ( ) => {
29
+ window . open ( 'https://cloud2.influxdata.com/signup' , '_blank' ) . focus ( )
30
+ }
31
+
32
+ const handleLogoClick = ( ) => {
33
+ window . open ( 'https://influxdata.com' , '_blank' ) . focus ( )
34
+ }
35
+
17
36
return (
18
37
< >
19
38
< Page . Header fullWidth >
20
- < Page . Title title = { flow . name || DEFAULT_PROJECT_NAME } />
39
+ < Grid >
40
+ < Grid . Row className = "flows-header-row" >
41
+ < Grid . Column widthMD = { Columns . Two } >
42
+ < div className = "flows-header-logo" onClick = { handleLogoClick } />
43
+ </ Grid . Column >
44
+ < Grid . Column
45
+ widthMD = { Columns . Ten }
46
+ className = "flows-header-column-signup"
47
+ >
48
+ < Button
49
+ icon = { IconFont . Star }
50
+ color = { ComponentColor . Success }
51
+ size = { ComponentSize . Medium }
52
+ shape = { ButtonShape . Default }
53
+ onClick = { handleSignUpClick }
54
+ text = "Sign up!"
55
+ testID = "sign-up--button"
56
+ />
57
+ </ Grid . Column >
58
+ </ Grid . Row >
59
+ < Page . Title title = { flow . name || DEFAULT_PROJECT_NAME } />
60
+ </ Grid >
21
61
</ Page . Header >
22
62
< Page . ControlBar fullWidth >
23
63
< Page . ControlBarRight >
0 commit comments