Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

refactor: style improvements

robinb192bf92fa74
diff --git a/ui/src/components/TagSelector/index.tsx b/ui/src/components/TagSelector/index.tsx
index a3eea698..b64336a7 100644
--- a/ui/src/components/TagSelector/index.tsx
+++ b/ui/src/components/TagSelector/index.tsx
@@ -5,7 +5,6 @@ import { useTranslation } from 'react-i18next';
import { marked } from 'marked';
import classNames from 'classnames';
-import { Icon } from '@answer/components';
import { useTagModal } from '@answer/hooks';
import { queryTags } from '@answer/api';
import type * as Type from '@answer/common/interface';
@@ -160,26 +159,23 @@ const TagSelector: FC<IProps> = ({
<Button
key={item.slug_name}
className={classNames(
- 'me-2 mb-2 text-nowrap',
+ 'me-2 mb-2 text-nowrap d-flex align-items-center',
index === repeatIndex && 'warning',
)}
variant="outline-secondary"
size="sm">
{item.slug_name}
- <Button
- className="btn-no-border"
- variant="link"
- onClick={() => handleRemove(item)}>
+ <span className="ms-1" onMouseUp={() => handleRemove(item)}>
x
- </Button>
+ </span>
</Button>
);
})}
{initialValue?.length < 5 || alwaysShowAddBtn ? (
<Dropdown onSelect={handleSelect}>
<Dropdown.Toggle variant="outline-secondary" size="sm">
- <Icon name="plus" />
+ <span className="me-1">+</span>
{t('add_btn')}
</Dropdown.Toggle>
<Dropdown.Menu>