Revize a44aa67e
Přidáno uživatelem Jaroslav Hrubý před asi 2 roky(ů)
webapp/components/annotation/TagItem.tsx | ||
---|---|---|
1 | 1 |
import { Container, Row, Stack } from 'react-bootstrap'; |
2 | 2 |
import { TagInfo } from '../../api'; |
3 |
import { Button } from 'antd'; |
|
4 |
import { DownOutlined, TagOutlined, UpOutlined } from '@ant-design/icons'; |
|
3 |
import { Button, Tooltip } from 'antd'; |
|
4 |
import { |
|
5 |
DownOutlined, |
|
6 |
QuestionCircleOutlined, |
|
7 |
TagOutlined, |
|
8 |
UpOutlined, |
|
9 |
} from '@ant-design/icons'; |
|
5 | 10 |
import React, { useContext, useState } from 'react'; |
6 | 11 |
import { SubTagItem } from './SubTagItem'; |
7 | 12 |
import { TagCategoryContext } from '../../contexts/TagCategoryContext'; |
... | ... | |
63 | 68 |
className="w-100 text-start rounded" |
64 | 69 |
disabled={submitting} |
65 | 70 |
> |
66 |
{props.tag.name} |
|
67 | 71 |
<TagOutlined style={{ color: props.tag.color ?? 'black' }} /> |
72 |
{props.tag.name} |
|
73 |
{props.tag.description && props.tag.description !== '' && ( |
|
74 |
<Tooltip |
|
75 |
title={props.tag.description} |
|
76 |
key={props.tag.description} |
|
77 |
> |
|
78 |
<QuestionCircleOutlined /> |
|
79 |
</Tooltip> |
|
80 |
)} |
|
68 | 81 |
</Button> |
69 | 82 |
)} |
70 | 83 |
{!hasSubTags && ( |
... | ... | |
73 | 86 |
className="w-100 text-start rounded" |
74 | 87 |
disabled={submitting} |
75 | 88 |
> |
76 |
{props.tag.name} |
|
77 | 89 |
<TagOutlined style={{ color: props.tag.color ?? 'black' }} /> |
90 |
{props.tag.name} |
|
91 |
{props.tag.description && props.tag.description !== '' && ( |
|
92 |
<Tooltip |
|
93 |
title={props.tag.description} |
|
94 |
key={props.tag.description} |
|
95 |
> |
|
96 |
<QuestionCircleOutlined /> |
|
97 |
</Tooltip> |
|
98 |
)} |
|
78 | 99 |
</Button> |
79 | 100 |
)} |
80 | 101 |
</Row> |
Také k dispozici: Unified diff
Tag buttons tooltips implemented