Projekt

Obecné

Profil

« Předchozí | Další » 

Revize d0ed1dbf

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

Added tooltips to buttons in the table

Zobrazit rozdíly:

webapp/pages/tags/index.tsx
3 3

  
4 4
import { useUnauthRedirect } from '../../hooks';
5 5
import { useRouter } from 'next/router';
6
import { Button, Checkbox, Popconfirm, Typography } from 'antd';
6
import { Button, Checkbox, Popconfirm, Tooltip, Typography } from 'antd';
7 7
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
8 8
import { faTags } from '@fortawesome/free-solid-svg-icons';
9 9
import { LoggedUserContext } from '../../contexts/LoggedUserContext';
......
98 98
            render: (text: any, record: any, index: number) => (
99 99
                <Stack direction="horizontal">
100 100
                    {record.depth < 2 && (
101
                        <Button type="primary" onClick={addChild(record)}>
102
                            <PlusOutlined />
103
                        </Button>
101
                        <Tooltip title="Přidat potomka">
102
                            <Button type="primary" onClick={addChild(record)}>
103
                                <PlusOutlined />
104
                            </Button>
105
                        </Tooltip>
104 106
                    )}
105
                    <Button type="text" onClick={editRecord(record)}>
106
                        <EditOutlined />
107
                    </Button>
107
                    <Tooltip title="Upravit">
108
                        <Button type="text" onClick={editRecord(record)}>
109
                            <EditOutlined />
110
                        </Button>
111
                    </Tooltip>
108 112
                    <Popconfirm
109 113
                        title="Opravdu chcete smazat?"
110 114
                        onConfirm={deleteRecord(record)}
111 115
                    >
112
                        <Button type="primary" danger>
113
                            <DeleteOutlined />
114
                        </Button>
116
                        <Tooltip title="Odstranit">
117
                            <Button type="primary" danger>
118
                                <DeleteOutlined />
119
                            </Button>
120
                        </Tooltip>
115 121
                    </Popconfirm>
116 122
                </Stack>
117 123
            ),

Také k dispozici: Unified diff