-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathTooltips.tsx
More file actions
81 lines (77 loc) · 2 KB
/
Tooltips.tsx
File metadata and controls
81 lines (77 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/* eslint no-alert: "off" */
import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Button, LoadingSpinner, Tooltip } from '@deephaven/components';
import { vsBell, dhFilePrint } from '@deephaven/icons';
import SampleSection from './SampleSection';
function Tooltips(): React.ReactElement {
const icons = [dhFilePrint, vsBell];
const iconElements = icons.map(icon => (
<FontAwesomeIcon key={`${icon.prefix}-${icon.iconName}`} icon={icon} />
));
return (
<SampleSection name="tooltips">
<h2
className="ui-title"
title="Make better looking tooltips than this one!"
>
Tooltips
</h2>
<div
className="btn btn-primary"
style={{
cursor: 'default',
marginBottom: '1rem',
marginRight: '1rem',
}}
>
Simple Tooltip
<Tooltip>Text only content</Tooltip>
</div>
<div
className="btn btn-secondary"
style={{
cursor: 'default',
marginBottom: '1rem',
marginRight: '1rem',
}}
>
Complex Tooltip
<Tooltip>
<div>
Here is some <i>cool</i> <b>text</b>
</div>
<hr />
<div>And some icons down here</div>
<div>
<LoadingSpinner className="loading-spinner-vertical-align" />
{iconElements}
</div>
</Tooltip>
</div>
<div
className="btn btn-success"
style={{
cursor: 'default',
marginBottom: '1rem',
marginRight: '1rem',
}}
>
Interactive Tooltip
<Tooltip interactive>
<div>This tooltip is interactive.</div>
<hr />
<Button
kind="primary"
onClick={() => {
alert('Button clicked!');
}}
>
Show Alert
</Button>
</Tooltip>
</div>
</SampleSection>
);
}
export default Tooltips;