From cc6737a4075835e58c77fb88df712a74975cabbb Mon Sep 17 00:00:00 2001 From: michalcesek Date: Thu, 27 Apr 2023 13:38:39 +0700 Subject: [PATCH] Add new close icon --- .../KsqlDb/Query/QueryForm/QueryForm.tsx | 4 ++-- .../Form/CustomParams/CustomParamField.tsx | 4 ++-- .../src/components/common/Alert/Alert.tsx | 4 ++-- .../common/Icons/CloseCircleIcon.tsx | 24 +++++++++++++++++++ .../Sections/KafkaCluster.tsx | 4 ++-- .../Sections/KafkaConnect.tsx | 4 ++-- 6 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 kafka-ui-react-app/src/components/common/Icons/CloseCircleIcon.tsx diff --git a/kafka-ui-react-app/src/components/KsqlDb/Query/QueryForm/QueryForm.tsx b/kafka-ui-react-app/src/components/KsqlDb/Query/QueryForm/QueryForm.tsx index 3803c1e10f..7456b5d2d9 100644 --- a/kafka-ui-react-app/src/components/KsqlDb/Query/QueryForm/QueryForm.tsx +++ b/kafka-ui-react-app/src/components/KsqlDb/Query/QueryForm/QueryForm.tsx @@ -9,7 +9,7 @@ import { } from 'react-hook-form'; import { Button } from 'components/common/Button/Button'; import IconButtonWrapper from 'components/common/Icons/IconButtonWrapper'; -import CloseIcon from 'components/common/Icons/CloseIcon'; +import CloseCircleIcon from 'components/common/Icons/CloseCircleIcon'; import { yupResolver } from '@hookform/resolvers/yup'; import yup from 'lib/yupExtended'; import PlusIcon from 'components/common/Icons/PlusIcon'; @@ -174,7 +174,7 @@ const QueryForm: React.FC = ({ aria-label="deleteProperty" onClick={removeProperty(index)} > - + ))} diff --git a/kafka-ui-react-app/src/components/Topics/shared/Form/CustomParams/CustomParamField.tsx b/kafka-ui-react-app/src/components/Topics/shared/Form/CustomParams/CustomParamField.tsx index 5ba51ad289..95d3bcb15c 100644 --- a/kafka-ui-react-app/src/components/Topics/shared/Form/CustomParams/CustomParamField.tsx +++ b/kafka-ui-react-app/src/components/Topics/shared/Form/CustomParams/CustomParamField.tsx @@ -8,7 +8,7 @@ import { FormError } from 'components/common/Input/Input.styled'; import Select from 'components/common/Select/Select'; import Input from 'components/common/Input/Input'; import IconButtonWrapper from 'components/common/Icons/IconButtonWrapper'; -import CloseIcon from 'components/common/Icons/CloseIcon'; +import CloseCircleIcon from 'components/common/Icons/CloseCircleIcon'; import * as C from 'components/Topics/shared/Form/TopicForm.styled'; import { ConfigSource } from 'generated-sources'; @@ -125,7 +125,7 @@ const CustomParamField: React.FC = ({ } title={`Delete customParam field ${index}`} > - + diff --git a/kafka-ui-react-app/src/components/common/Alert/Alert.tsx b/kafka-ui-react-app/src/components/common/Alert/Alert.tsx index 5b58a573d4..963ac8b2d3 100644 --- a/kafka-ui-react-app/src/components/common/Alert/Alert.tsx +++ b/kafka-ui-react-app/src/components/common/Alert/Alert.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import CloseIcon from 'components/common/Icons/CloseIcon'; +import CloseCircleIcon from 'components/common/Icons/CloseCircleIcon'; import IconButtonWrapper from 'components/common/Icons/IconButtonWrapper'; import { ToastTypes } from 'lib/errorHandling'; @@ -19,7 +19,7 @@ const Alert: React.FC = ({ title, type, message, onDissmiss }) => ( {message} - + ); diff --git a/kafka-ui-react-app/src/components/common/Icons/CloseCircleIcon.tsx b/kafka-ui-react-app/src/components/common/Icons/CloseCircleIcon.tsx new file mode 100644 index 0000000000..bdc64f02b0 --- /dev/null +++ b/kafka-ui-react-app/src/components/common/Icons/CloseCircleIcon.tsx @@ -0,0 +1,24 @@ +import React from 'react'; +import { useTheme } from 'styled-components'; + +const CloseCircleIcon: React.FC = () => { + const theme = useTheme(); + return ( + + + + ); +}; + +export default CloseCircleIcon; diff --git a/kafka-ui-react-app/src/widgets/ClusterConfigForm/Sections/KafkaCluster.tsx b/kafka-ui-react-app/src/widgets/ClusterConfigForm/Sections/KafkaCluster.tsx index c71f2d72ec..8a1be62228 100644 --- a/kafka-ui-react-app/src/widgets/ClusterConfigForm/Sections/KafkaCluster.tsx +++ b/kafka-ui-react-app/src/widgets/ClusterConfigForm/Sections/KafkaCluster.tsx @@ -3,7 +3,7 @@ import Input from 'components/common/Input/Input'; import { useFieldArray, useFormContext } from 'react-hook-form'; import { FormError, InputHint } from 'components/common/Input/Input.styled'; import { ErrorMessage } from '@hookform/error-message'; -import CloseIcon from 'components/common/Icons/CloseIcon'; +import CloseCircleIcon from 'components/common/Icons/CloseCircleIcon'; import { Button } from 'components/common/Button/Button'; import PlusIcon from 'components/common/Icons/PlusIcon'; import * as S from 'widgets/ClusterConfigForm/ClusterConfigForm.styled'; @@ -80,7 +80,7 @@ const KafkaCluster: React.FC = () => { aria-label="deleteProperty" onClick={() => remove(index)} > - + ))} diff --git a/kafka-ui-react-app/src/widgets/ClusterConfigForm/Sections/KafkaConnect.tsx b/kafka-ui-react-app/src/widgets/ClusterConfigForm/Sections/KafkaConnect.tsx index 4f5840ff23..e51c9d5ffc 100644 --- a/kafka-ui-react-app/src/widgets/ClusterConfigForm/Sections/KafkaConnect.tsx +++ b/kafka-ui-react-app/src/widgets/ClusterConfigForm/Sections/KafkaConnect.tsx @@ -5,7 +5,7 @@ import Input from 'components/common/Input/Input'; import { useFieldArray, useFormContext } from 'react-hook-form'; import PlusIcon from 'components/common/Icons/PlusIcon'; import IconButtonWrapper from 'components/common/Icons/IconButtonWrapper'; -import CloseIcon from 'components/common/Icons/CloseIcon'; +import CloseCircleIcon from 'components/common/Icons/CloseCircleIcon'; import { FlexGrow1, FlexRow, @@ -66,7 +66,7 @@ const KafkaConnect = () => { remove(index)}> - +