-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Expand file tree
/
Copy pathlist.tsx
More file actions
59 lines (55 loc) · 1.82 KB
/
list.tsx
File metadata and controls
59 lines (55 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import {Flex, Stack} from '@sentry/scraps/layout';
import * as Layout from 'sentry/components/layouts/thirds';
import {NoProjectMessage} from 'sentry/components/noProjectMessage';
import {PageHeadingQuestionTooltip} from 'sentry/components/pageHeadingQuestionTooltip';
import {useOrganization} from 'sentry/utils/useOrganization';
import {TopBar} from 'sentry/views/navigation/topBar';
import {useHasPageFrameFeature} from 'sentry/views/navigation/useHasPageFrameFeature';
interface WorkflowEngineListLayoutProps {
actions: React.ReactNode;
/** The main content for this page */
children: React.ReactNode;
description: string;
docsUrl: string;
title: string;
}
/**
* Precomposed full-width layout for Automations / Monitors index pages.
* The `children` are rendered as the main body content.
*/
export function WorkflowEngineListLayout({
children,
actions,
title,
description,
docsUrl,
}: WorkflowEngineListLayoutProps) {
const organization = useOrganization();
const hasPageFrameFeature = useHasPageFrameFeature();
return (
<Stack flex={1}>
<NoProjectMessage organization={organization}>
<Layout.Header unified>
<Layout.HeaderContent>
<Layout.Title>
{title}
<PageHeadingQuestionTooltip docsUrl={docsUrl} title={description} />
</Layout.Title>
</Layout.HeaderContent>
{hasPageFrameFeature ? (
<TopBar.Slot name="actions">{actions}</TopBar.Slot>
) : (
<Layout.HeaderActions>{actions}</Layout.HeaderActions>
)}
</Layout.Header>
<Layout.Body>
<Layout.Main width="full">
<Flex direction="column" gap="lg">
{children}
</Flex>
</Layout.Main>
</Layout.Body>
</NoProjectMessage>
</Stack>
);
}