[feat][Remote objects] Edit a connection (for pg) (#5210)

## Context
#4774 

## How was it tested
Locally

## In further PRs
- Update connection status upon page change
- Adapt Info banner to dark mode
- placeholders for form
This commit is contained in:
Marie
2024-04-30 17:46:30 +02:00
committed by GitHub
parent 3bf9045990
commit 1b2ed80c1c
39 changed files with 727 additions and 195 deletions

View File

@ -9,8 +9,8 @@ export type InfoAccent = 'blue' | 'danger';
export type InfoProps = {
accent?: InfoAccent;
text: string;
buttonTitle: string;
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
buttonTitle?: string;
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
};
const StyledTextContainer = styled.div`
@ -54,12 +54,14 @@ export const Info = ({
<IconInfoCircle size={theme.icon.size.md} />
{text}
</StyledTextContainer>
<Button
title={buttonTitle}
onClick={onClick}
size={'small'}
variant={'secondary'}
/>
{buttonTitle && onClick && (
<Button
title={buttonTitle}
onClick={onClick}
size={'small'}
variant={'secondary'}
/>
)}
</StyledInfo>
);
};

View File

@ -123,6 +123,7 @@ const TextInputV2Component = (
disabled,
tabIndex,
RightIcon,
autoComplete,
}: TextInputV2ComponentProps,
// eslint-disable-next-line @nx/workspace-component-props-naming
ref: ForwardedRef<HTMLInputElement>,
@ -143,7 +144,7 @@ const TextInputV2Component = (
{label && <StyledLabel>{label + (required ? '*' : '')}</StyledLabel>}
<StyledInputContainer>
<StyledInput
autoComplete="off"
autoComplete={autoComplete || 'off'}
ref={combinedRef}
tabIndex={tabIndex ?? 0}
onFocus={onFocus}

View File

@ -14,7 +14,7 @@ const StyledWrapper = styled.nav`
font-size: ${({ theme }) => theme.font.size.lg};
font-weight: ${({ theme }) => theme.font.weight.semiBold};
gap: ${({ theme }) => theme.spacing(2)};
line-height: ${({ theme }) => theme.text.lineHeight.md};
line-height: ${({ theme }) => theme.text.lineHeight.lg};
`;
const StyledLink = styled(Link)`