-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathToast.tsx
More file actions
47 lines (45 loc) · 1.21 KB
/
Toast.tsx
File metadata and controls
47 lines (45 loc) · 1.21 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
import React from 'react';
import { Button, ButtonGroup, ToastQueue } from '@deephaven/components';
import SampleSection from './SampleSection';
function Toast(): React.ReactElement {
return (
<SampleSection name="toast">
<h2 className="ui-title">Toast</h2>
<div>
<ButtonGroup>
<Button
kind="tertiary"
onClick={() =>
ToastQueue.neutral('Neutral toast', { timeout: 5000 })
}
>
Show neutral toast
</Button>
<Button
kind="success"
onClick={() =>
ToastQueue.positive('Positive toast', { timeout: 5000 })
}
>
Show positive toast
</Button>
<Button
kind="danger"
onClick={() =>
ToastQueue.negative('Negative toast', { timeout: 5000 })
}
>
Show negative toast
</Button>
<Button
kind="primary"
onClick={() => ToastQueue.info('Info toast', { timeout: 5000 })}
>
Show info toast
</Button>
</ButtonGroup>
</div>
</SampleSection>
);
}
export default Toast;