diff --git a/web/app/components/app/configuration/base/icons/remove-icon/index.tsx b/web/app/components/app/configuration/base/icons/remove-icon/index.tsx index 497d5b68c2..0ce648c0da 100644 --- a/web/app/components/app/configuration/base/icons/remove-icon/index.tsx +++ b/web/app/components/app/configuration/base/icons/remove-icon/index.tsx @@ -1,18 +1,18 @@ 'use client' -import React, { FC, useState } from 'react' +import React, { useState } from 'react' import cn from 'classnames' -export interface IRemoveIconProps { +type IRemoveIconProps = { className?: string isHoverStatus?: boolean onClick: () => void } -const RemoveIcon: FC = ({ +const RemoveIcon = ({ className, isHoverStatus, - onClick -}) => { + onClick, +}: IRemoveIconProps) => { const [isHovered, setIsHovered] = useState(false) const computedIsHovered = isHoverStatus || isHovered return ( @@ -23,7 +23,7 @@ const RemoveIcon: FC = ({ onClick={onClick} > - + ) diff --git a/web/app/components/app/configuration/dataset-config/card-item/index.tsx b/web/app/components/app/configuration/dataset-config/card-item/index.tsx index 4d9ebc9f37..650d717553 100644 --- a/web/app/components/app/configuration/dataset-config/card-item/index.tsx +++ b/web/app/components/app/configuration/dataset-config/card-item/index.tsx @@ -29,9 +29,9 @@ const CardItem: FC = ({
-
+
@@ -47,13 +47,13 @@ const CardItem: FC = ({ )}
-
+
{formatNumber(config.word_count)} {t('appDebug.feature.dataSet.words')} ยท {formatNumber(config.document_count)} {t('appDebug.feature.dataSet.textBlocks')}
- {!readonly && onRemove(config.id)} />} + {!readonly && onRemove(config.id)} />}
) } diff --git a/web/app/components/app/configuration/dataset-config/card-item/style.module.css b/web/app/components/app/configuration/dataset-config/card-item/style.module.css index def8bf8d66..9113f795bc 100644 --- a/web/app/components/app/configuration/dataset-config/card-item/style.module.css +++ b/web/app/components/app/configuration/dataset-config/card-item/style.module.css @@ -8,9 +8,9 @@ } .deleteBtn { - display: none; + visibility: hidden; } .card:hover .deleteBtn { - display: block; + visibility: visible; } \ No newline at end of file