Add warning message for the Topic Danger zone #2534 (#2663)

* Add warning message for Danger zone in case of editing the Topic #2534

* Used existing palette color on warning message for Danger zone in case of editing the Topic #2534

* Update kafka-ui-react-app/src/components/Topics/Topic/Edit/DangerZone/DangerZone.tsx

Co-authored-by: davitbejanyan <dbejanyan@provectus.com>
Co-authored-by: Oleg Shur <workshur@gmail.com>
Co-authored-by: Roman Zabaluev <rzabaluev@provectus.com>
This commit is contained in:
David-DB88 2022-09-30 17:04:40 +04:00 committed by GitHub
parent 2f786c080b
commit a1d14ab430
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 3 deletions

View file

@ -15,11 +15,15 @@ export const Wrapper = styled.div`
`; `;
export const Title = styled.h1` export const Title = styled.h1`
color: ${({ theme }) => theme.dangerZone.color}; color: ${({ theme }) => theme.dangerZone.color.title};
font-size: 20px; font-size: 20px;
padding-bottom: 16px; padding-bottom: 16px;
`; `;
export const Warning = styled.div`
color: ${({ theme }) => theme.dangerZone.color.warningMessage};
font-size: 12px;
padding-bottom: 16px;
`;
export const Form = styled.form` export const Form = styled.form`
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;

View file

@ -81,6 +81,10 @@ const DangerZone: React.FC<DangerZoneProps> = ({
return ( return (
<S.Wrapper> <S.Wrapper>
<S.Title>Danger Zone</S.Title> <S.Title>Danger Zone</S.Title>
<S.Warning>
Change these parameters only if you are absolutely sure what you are
doing.
</S.Warning>
<div> <div>
<FormProvider {...partitionsMethods}> <FormProvider {...partitionsMethods}>
<S.Form <S.Form

View file

@ -518,7 +518,10 @@ const theme = {
}, },
dangerZone: { dangerZone: {
borderColor: Colors.neutral[10], borderColor: Colors.neutral[10],
color: Colors.red[50], color: {
title: Colors.red[50],
warningMessage: Colors.neutral[50],
},
}, },
configList: { configList: {
color: Colors.neutral[30], color: Colors.neutral[30],