11// Libraries
22import 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'
413
514// Contexts
615import { FlowContext } from 'src/flows/context/flow.current'
@@ -11,13 +20,44 @@ import TimeRangeLabel from 'src/flows/components/header/TimeRangeLabel'
1120
1221import { DEFAULT_PROJECT_NAME } from 'src/flows'
1322
23+ import './ReadOnlyHeader.scss'
24+
1425const ReadOnlyHeader : FC = ( ) => {
1526 const { flow} = useContext ( FlowContext )
1627
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+
1736 return (
1837 < >
1938 < 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 >
2161 </ Page . Header >
2262 < Page . ControlBar fullWidth >
2363 < Page . ControlBarRight >
0 commit comments