-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Export Spectrum Toast from Components Package (#2294)
Closes #2293 This is needed to implement the deephaven.ui toast component.
- Loading branch information
1 parent
cb1f11f
commit a0961ad
Showing
11 changed files
with
3,156 additions
and
1,488 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.