Projekt

Obecné

Profil

« Předchozí | Další » 

Revize fa93df26

Přidáno uživatelem Dominik Poch před asi 2 roky(ů)

Icons

Zobrazit rozdíly:

webapp/components/annotation/CategoryItem.tsx
1 1
import { Col, Container, Row, Stack } from 'react-bootstrap';
2 2
import { Button, Tooltip } from 'antd';
3
import {
4
    DownOutlined,
5
    QuestionCircleOutlined,
6
    TagOutlined,
7
    UpOutlined,
8
} from '@ant-design/icons';
3
import { QuestionCircleOutlined } from '@ant-design/icons';
9 4
import { TagCategoryInfo } from '../../api';
10 5
import React, { useState } from 'react';
11 6
import { TagItem } from './TagItem';
12 7

  
8
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
9
import { faAngleDown, faAngleUp } from '@fortawesome/free-solid-svg-icons';
10
import { faCircleQuestion } from '@fortawesome/free-regular-svg-icons';
11
import styles from '/styles/Icon.module.scss';
13 12
/**
14 13
 * Creates a single item for a category in a tag panel.
15 14
 * @param props Properties should contain a category.
......
24 23
    /**
25 24
     * Button icon.
26 25
     */
27
    const [buttonIcon, setButtonIcon] = useState<React.ReactNode>(<DownOutlined />);
26
    const [buttonIcon, setButtonIcon] = useState<React.ReactNode>(
27
        <FontAwesomeIcon icon={faAngleDown} className={styles.iconLeft} />
28
    );
28 29

  
29 30
    /**
30 31
     * Changes visibility of tags.
31 32
     */
32 33
    const changeTagsVisibility = () => {
33
        setButtonIcon(visibleTags ? <DownOutlined /> : <UpOutlined />);
34
        setButtonIcon(
35
            visibleTags ? (
36
                <FontAwesomeIcon icon={faAngleDown} className={styles.iconLeft} />
37
            ) : (
38
                <FontAwesomeIcon icon={faAngleUp} className={styles.iconLeft} />
39
            )
40
        );
34 41
        setVisibleTags(!visibleTags);
35 42
    };
36 43

  
......
49 56
                            title={props.category.description}
50 57
                            key={props.category.description}
51 58
                        >
52
                            <QuestionCircleOutlined />
59
                            <FontAwesomeIcon icon={faCircleQuestion} />
53 60
                        </Tooltip>
54 61
                    )}
55 62
                </Button>

Také k dispozici: Unified diff