1
1
import styled from '@emotion/styled' ;
2
2
3
3
import { Flex } from 'sentry/components/container/flex' ;
4
+ import ProjectBadge from 'sentry/components/idBadge/projectBadge' ;
4
5
import * as Layout from 'sentry/components/layouts/thirds' ;
5
6
import { useDocumentTitle } from 'sentry/components/sentryDocumentTitle' ;
6
7
import { ActionsFromContext } from 'sentry/components/workflowEngine/layout/actions' ;
7
8
import { BreadcrumbsFromContext } from 'sentry/components/workflowEngine/layout/breadcrumbs' ;
8
9
import { space } from 'sentry/styles/space' ;
10
+ import type { AvatarProject } from 'sentry/types/project' ;
9
11
10
12
export interface WorkflowEngineDetailLayoutProps {
11
13
/**
12
14
* The main content for this page
13
15
* Expected to include `<DetailLayout.Main>` and `<DetailLayout.Sidebar>` components.
14
16
*/
15
17
children : React . ReactNode ;
18
+ project : AvatarProject ;
16
19
}
17
20
18
21
/**
19
22
* Precomposed 67/33 layout for Automations / Monitors detail pages.
20
23
*/
21
- function DetailLayout ( { children} : WorkflowEngineDetailLayoutProps ) {
24
+ function DetailLayout ( { children, project } : WorkflowEngineDetailLayoutProps ) {
22
25
const title = useDocumentTitle ( ) ;
23
26
return (
24
27
< StyledPage >
25
28
< Layout . Header >
26
29
< Layout . HeaderContent >
27
30
< BreadcrumbsFromContext />
28
31
< Layout . Title > { title } </ Layout . Title >
32
+ < ProjectContainer >
33
+ < ProjectBadge project = { project } disableLink avatarSize = { 16 } />
34
+ </ ProjectContainer >
29
35
</ Layout . HeaderContent >
30
36
< ActionsFromContext />
31
37
</ Layout . Header >
@@ -34,6 +40,11 @@ function DetailLayout({children}: WorkflowEngineDetailLayoutProps) {
34
40
) ;
35
41
}
36
42
43
+ const ProjectContainer = styled ( 'div' ) `
44
+ margin-top: ${ space ( 1 ) } ;
45
+ font-size: ${ p => p . theme . fontSizeMedium } ;
46
+ ` ;
47
+
37
48
const StyledPage = styled ( Layout . Page ) `
38
49
background: ${ p => p . theme . background } ;
39
50
` ;
0 commit comments