Feat: Add tooltip to question item of ChunkCreatingModal #3873 (#3880)

### What problem does this PR solve?

Feat: Add tooltip to question item of ChunkCreatingModal  #3873

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-12-05 17:03:20 +08:00
committed by GitHub
parent 1f0a153d0e
commit 3a0e9f9263
7 changed files with 39 additions and 35 deletions

View File

@ -1,8 +1,21 @@
.tweenGroup {
display: inline-block;
:global(.ant-tag) {
margin-bottom: 8px;
font-size: 14px;
padding: 2px 8px;
display: flex;
gap: 8px;
flex-wrap: wrap;
width: 100%;
margin-bottom: 8px;
}
.tag {
max-width: 100%;
margin: 0;
padding: 2px 20px 2px 4px;
font-size: 14px;
.textEllipsis();
position: relative;
:global(.ant-tag-close-icon) {
position: absolute;
top: 7px;
right: 4px;
}
}

View File

@ -45,8 +45,10 @@ const EditTag = ({ tags, setTags }: EditTagsProps) => {
};
const forMap = (tag: string) => {
const tagElem = (
return (
<Tag
key={tag}
className={styles.tag}
closable
onClose={(e) => {
e.preventDefault();
@ -56,11 +58,6 @@ const EditTag = ({ tags, setTags }: EditTagsProps) => {
{tag}
</Tag>
);
return (
<span key={tag} style={{ display: 'inline-block' }}>
{tagElem}
</span>
);
};
const tagChild = tags?.map(forMap);
@ -71,8 +68,8 @@ const EditTag = ({ tags, setTags }: EditTagsProps) => {
};
return (
<>
<span>
<div>
{Array.isArray(tagChild) && tagChild.length > 0 && (
<TweenOneGroup
className={styles.tweenGroup}
enter={{
@ -91,7 +88,7 @@ const EditTag = ({ tags, setTags }: EditTagsProps) => {
>
{tagChild}
</TweenOneGroup>
</span>
)}
{inputVisible ? (
<Input
ref={inputRef}
@ -107,7 +104,7 @@ const EditTag = ({ tags, setTags }: EditTagsProps) => {
<PlusOutlined />
</Tag>
)}
</>
</div>
);
};