generated from vtex-sites/base.store
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Uses
OutOfStock
component from FSUI (#70)
- Loading branch information
1 parent
aa15c62
commit 88c1e46
Showing
4 changed files
with
87 additions
and
40 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs' | ||
import { SessionProvider } from '@faststore/sdk' | ||
|
||
|
||
import OutOfStock from '.' | ||
|
||
<Meta | ||
title="Organisms/OutOfStock" | ||
argTypes={{ | ||
buttonIcon: { control: false, }, | ||
notificationMsgIcon: { control: false, }, | ||
}} | ||
component={OutOfStock} | ||
/> | ||
|
||
<header> | ||
|
||
# Out of Stock | ||
|
||
Out of Stock are used to announce to users that the product is out of stock. And ask for their contact to let they know when the product arrives. | ||
|
||
</header> | ||
|
||
The `OutOfStock` component uses [FastStore UI OutOfStock](https://www.faststore.dev/reference/ui/organisms/OutOfStock) as base. | ||
|
||
### Import | ||
|
||
`import OutOfStock from '../components/product/OutOfStock'` | ||
|
||
### Usage | ||
|
||
<Canvas> | ||
<Story | ||
name="OutOfStock" | ||
args={{ | ||
title: | ||
'Out of Stock', | ||
buttonText: 'Notify me', | ||
notificationMsg: 'Notify me when available', | ||
}} | ||
> | ||
{(args) => <SessionProvider initialState={{}}><OutOfStock {...args} /></SessionProvider>} | ||
</Story> | ||
</Canvas> | ||
|
||
<ArgsTable story="OutOfStock" /> |
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
88c1e46
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
gatsby-store-storybook – ./
gatsby-store-storybook-git-main-faststore.vercel.app
gatsby-store-pi.vercel.app
gatsby-store-storybook-faststore.vercel.app