Simplify webhook creation flow (#10107)

## Before


https://github.com/user-attachments/assets/6bc61970-f0e2-4826-bf95-2b0c9fff5113


## After
- no new webhook form anymore
- autosave on update


https://github.com/user-attachments/assets/c7a304ec-76f5-4c2b-ac5e-7a846bd7f23b

@Bonapara ok for you?
This commit is contained in:
martmull
2025-02-10 16:48:51 +01:00
committed by GitHub
parent f733307517
commit c07f43fcb1
8 changed files with 224 additions and 295 deletions

View File

@ -11,6 +11,7 @@ import { PageHeader } from './PageHeader';
type SubMenuTopBarContainerProps = {
children: JSX.Element | JSX.Element[];
title?: string | JSX.Element;
reserveTitleSpace?: boolean;
actionButton?: ReactNode;
className?: string;
links: BreadcrumbProps['links'];
@ -22,17 +23,20 @@ const StyledContainer = styled.div`
width: 100%;
`;
const StyledTitle = styled.h3`
const StyledTitle = styled.h3<{ reserveTitleSpace?: boolean }>`
color: ${({ theme }) => theme.font.color.primary};
font-size: ${({ theme }) => theme.font.size.lg};
font-weight: ${({ theme }) => theme.font.weight.semiBold};
line-height: 1.2;
margin: ${({ theme }) => theme.spacing(8, 8, 2)};
min-height: ${({ theme, reserveTitleSpace }) =>
reserveTitleSpace ? theme.spacing(5) : 'none'};
`;
export const SubMenuTopBarContainer = ({
children,
title,
reserveTitleSpace,
actionButton,
className,
links,
@ -44,7 +48,11 @@ export const SubMenuTopBarContainer = ({
</PageHeader>
<PageBody>
<InformationBannerWrapper />
{title && <StyledTitle>{title}</StyledTitle>}
{(title || reserveTitleSpace) && (
<StyledTitle reserveTitleSpace={reserveTitleSpace}>
{title}
</StyledTitle>
)}
{children}
</PageBody>
</StyledContainer>