Revize a44aa67e
Přidáno uživatelem Jaroslav Hrubý před asi 2 roky(ů)
webapp/components/annotation/SubTagItem.tsx | ||
---|---|---|
1 | 1 |
import { SubTagInfo, TagInfo } from '../../api'; |
2 | 2 |
import { Container, Row } from 'react-bootstrap'; |
3 |
import { Button } from 'antd'; |
|
4 |
import { useContext } from 'react'; |
|
3 |
import { Button, Tooltip } from 'antd';
|
|
4 |
import React, { useContext } from 'react';
|
|
5 | 5 |
import { TagCategoryContext } from '../../contexts/TagCategoryContext'; |
6 | 6 |
import { AnnotationContext } from '../../contexts/AnnotationContext'; |
7 |
import { QuestionCircleOutlined } from '@ant-design/icons'; |
|
7 | 8 |
|
8 | 9 |
/** |
9 | 10 |
* Creates a single tag item in a tag panel. |
... | ... | |
37 | 38 |
disabled={submitting} |
38 | 39 |
> |
39 | 40 |
{props.subTag.name} |
41 |
{props.subTag.description && props.subTag.description !== '' && ( |
|
42 |
<Tooltip |
|
43 |
title={props.subTag.description} |
|
44 |
key={props.subTag.description} |
|
45 |
> |
|
46 |
<QuestionCircleOutlined /> |
|
47 |
</Tooltip> |
|
48 |
)} |
|
40 | 49 |
</Button> |
41 | 50 |
</Row> |
42 | 51 |
</Container> |
Také k dispozici: Unified diff
Tag buttons tooltips implemented