Skip to content

Commit 2f6c088

Browse files
author
Gene Hynson
authored
feat: branding for shared notebooks (#2929)
1 parent 7c9c6bf commit 2f6c088

File tree

3 files changed

+59
-2
lines changed

3 files changed

+59
-2
lines changed

assets/images/logo.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.flows-header-logo {
2+
background-size: contain;
3+
background-repeat: no-repeat;
4+
background-image: url('../../../assets/images/logo.svg');
5+
text-align: end;
6+
height: 50px;
7+
cursor: pointer;
8+
}
9+
10+
.flows-header-column-signup {
11+
text-align: end;
12+
}
13+
14+
.flows-header-row {
15+
margin-top: 64px;
16+
}

src/flows/components/ReadOnlyHeader.tsx

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
// Libraries
22
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'
413

514
// Contexts
615
import {FlowContext} from 'src/flows/context/flow.current'
@@ -11,13 +20,44 @@ import TimeRangeLabel from 'src/flows/components/header/TimeRangeLabel'
1120

1221
import {DEFAULT_PROJECT_NAME} from 'src/flows'
1322

23+
import './ReadOnlyHeader.scss'
24+
1425
const 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

Comments
 (0)