forked from viamrobotics/prime
-
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.
APP-2198: Addressing stylistic issues in toast (viamrobotics#457)
- Loading branch information
Ojima Abraham
authored
Jan 9, 2024
1 parent
fa44161
commit cde5dae
Showing
7 changed files
with
80 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,7 @@ export { | |
|
||
export { | ||
ToastContainer, | ||
ToastBanner, | ||
provideToast, | ||
useToast, | ||
ToastVariant, | ||
|
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Canvas, Meta, Story } from '@storybook/addon-docs'; | ||
import * as ToastBannerStories from './toast-banner.stories.svelte'; | ||
|
||
<Meta title='Elements/ToastBanner' /> | ||
|
||
# ToastBanner | ||
|
||
Toast Banner message of type success. | ||
|
||
```ts | ||
import { ToastBanner } from '@viamrobotics/prime-core'; | ||
``` | ||
|
||
<Canvas> | ||
<Story of={ToastBannerStories.Success} /> | ||
</Canvas> | ||
|
||
<Canvas> | ||
<Story of={ToastBannerStories.SuccessWithEmphasizedAction} /> | ||
</Canvas> |
32 changes: 32 additions & 0 deletions
32
packages/storybook/src/stories/toast-banner.stories.svelte
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,32 @@ | ||
<script lang="ts"> | ||
import { Meta, Story } from '@storybook/addon-svelte-csf'; | ||
import { ToastBanner } from '@viamrobotics/prime-core'; | ||
</script> | ||
|
||
<Meta title="Elements/ToastBanner" /> | ||
|
||
<Story name="Success"> | ||
<ToastBanner | ||
message="Success message" | ||
dismiss={() => { | ||
console.log('Clicked close button'); | ||
}} | ||
cx="max-w-[240px]" | ||
/> | ||
</Story> | ||
|
||
<Story name="SuccessWithEmphasizedAction"> | ||
<ToastBanner | ||
message="Success message" | ||
dismiss={() => { | ||
console.log('Clicked close button'); | ||
}} | ||
action={{ | ||
text: 'action', | ||
handler: () => { | ||
console.log('Clicked action'); | ||
}, | ||
}} | ||
cx="max-w-[280px]" | ||
/> | ||
</Story> |