forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UI Framework][K7] Clean up toasts (elastic#13502)
Prettier toasts that are responsive.
- Loading branch information
Showing
12 changed files
with
179 additions
and
120 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1,38 +1,22 @@ | ||
import React from 'react'; | ||
|
||
import { | ||
KuiLink, | ||
KuiText, | ||
KuiToast, | ||
} from '../../../../components'; | ||
|
||
export default () => ( | ||
<div> | ||
<KuiToast | ||
title="Check it out, here's a really long title that will wrap within a narrower browser" | ||
iconType="user" | ||
title="Example of a good toast" | ||
onClose={() => window.alert('Dismiss toast')} | ||
> | ||
<KuiText size="small" verticalRhythm> | ||
<p> | ||
Here’s some stuff that you need to know. We can make this text really long so that, | ||
when viewed within a browser that’s fairly narrow, it will wrap, too. | ||
</p> | ||
</KuiText> | ||
|
||
<KuiText size="small"> | ||
<p> | ||
And some other stuff on another line, just for kicks. And <KuiLink href="#">here’s a link</KuiLink>. | ||
A good toast message is short and to the point. It should very rarely include multiple | ||
paragraphs. | ||
</p> | ||
</KuiText> | ||
</KuiToast> | ||
|
||
<br /> | ||
|
||
<KuiToast | ||
title="Check it out, here's a really long title that will wrap within a narrower browser" | ||
iconType="user" | ||
onClose={() => window.alert('Dismiss toast')} | ||
/> | ||
</div> | ||
); |
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 |
---|---|---|
@@ -1,29 +1,23 @@ | ||
import React from 'react'; | ||
|
||
import { | ||
KuiLink, | ||
KuiText, | ||
KuiToast, | ||
} from '../../../../components'; | ||
|
||
export default () => ( | ||
<KuiToast | ||
title="Check it out, here's a really long title that will wrap within a narrower browser" | ||
title="Icons should be rare" | ||
type="info" | ||
iconType="discoverApp" | ||
iconType="user" | ||
onClose={() => window.alert('Dismiss toast')} | ||
> | ||
<KuiText size="small" verticalRhythm> | ||
<p> | ||
Here’s some stuff that you need to know. We can make this text really long so that, | ||
when viewed within a browser that’s fairly narrow, it will wrap, too. | ||
</p> | ||
</KuiText> | ||
|
||
<KuiText size="small"> | ||
<p> | ||
And some other stuff on another line, just for kicks. And <KuiLink href="#">here’s a link</KuiLink>. | ||
Icons should be used rarely. They're good for warnings, but when paired with | ||
long titles they look out of place. | ||
</p> | ||
</KuiText> | ||
|
||
</KuiToast> | ||
); |
Oops, something went wrong.