diff --git a/CHANGELOG.md b/CHANGELOG.md index 88e79ba9..f2db5aa2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Replaces `EmptyState` Related Components with Use Cases section on storybook ([#126](https://github.com/vtex-sites/nextjs.store/pull/126)) - Tweaks `EmptyState` token name ([#125](https://github.com/vtex-sites/nextjs.store/pull/125)) - Storybook's version from 6.4.20 to 6.5.9 ([#120](https://github.com/vtex-sites/nextjs.store/pull/120)) - Unifies `Link` component usage by adding support for both external and client-side links ([#117](https://github.com/vtex-sites/nextjs.store/pull/117)) diff --git a/src/components/cart/EmptyCart/EmptyCart.stories.mdx b/src/components/cart/EmptyCart/EmptyCart.stories.mdx deleted file mode 100644 index c9f3c3f9..00000000 --- a/src/components/cart/EmptyCart/EmptyCart.stories.mdx +++ /dev/null @@ -1,44 +0,0 @@ -import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs' - -import { TokenTable, TokenRow } from 'src/../.storybook/components' - -import EmptyCart from 'src/components/cart/EmptyCart' - - - -export const Template = (args) => - -
- -# EmptyCart - -An implementation of the `EmptyState` that represents the Cart with no items. - -
- -## Usage - -`import EmptyCart from 'src/components/cart/EmptyCart'` - - - {Template.bind({})} - - - - -## Nested Elements - -### Title - - - - - - diff --git a/src/components/sections/ProductGallery/EmptyGallery.stories.mdx b/src/components/sections/ProductGallery/EmptyGallery.stories.mdx deleted file mode 100644 index 04b60427..00000000 --- a/src/components/sections/ProductGallery/EmptyGallery.stories.mdx +++ /dev/null @@ -1,50 +0,0 @@ -import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs' - -import { TokenTable, TokenRow } from 'src/../.storybook/components' - -import EmptyGallery from 'src/components/sections/ProductGallery/EmptyGallery' - - - -export const Template = (args) => - -
- -# EmptyGallery - -An implementation of the `EmptyState` that represents a Gallery with no items. - -
- -## Usage - -`import EmptyGallery from 'src/components/sections/ProductGallery/EmptyGallery'` - - - {Template.bind({})} - - ---- - -## Nested Elements - -### Title - - - - - - - -### Link - - - - diff --git a/src/components/ui/EmptyState/EmptyState.stories.mdx b/src/components/ui/EmptyState/EmptyState.stories.mdx index 9aa399a9..9cbffa54 100644 --- a/src/components/ui/EmptyState/EmptyState.stories.mdx +++ b/src/components/ui/EmptyState/EmptyState.stories.mdx @@ -2,11 +2,13 @@ import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs' import { TokenTable, TokenRow } from 'src/../.storybook/components' +import Button from 'src/components/ui/Button' +import Icon from 'src/components/ui/Icon' +import { ButtonLink } from 'src/components/ui/Button' + import EmptyState from '.' -import EmptyGallery from 'src/components/sections/ProductGallery' -import EmptyCart from 'src/components/cart/EmptyCart' - + export const Template = (args) => ( Nothing to display @@ -43,6 +45,34 @@ This component represents an empty state, usually used on `EmptyCart` and `Empty --- +## Nested Elements + +### Title + + + + + + + +### Link + + + + + +--- + ## Variants ### Rounded @@ -56,32 +86,61 @@ This component represents an empty state, usually used on `EmptyCart` and `Empty --- -## Related Components - -
-
-
- - - -
-
-

Empty Cart

-

- Displays the empty cart message along with the `Start Shopping` button. -

-
- -
-
-
- - - -
-
-

Empty Gallery

-

Displays the empty gallery message along with some button navigation options.

-
-
-
+## Use Cases + +### EmptyCart + +export const TemplateEmptyCart = () => ( + +
+ +

Your Cart is empty

+
+ +
+) + +An implementation of the `EmptyState` that represents the Cart with no items. + + + {TemplateEmptyCart.bind({})} + + +### EmptyGallery + +export const TemplateEmptyGallery = (args) => { + return ( + +
+ +

Nothing matches with your search

+
+ + } + iconPosition="left" + > + Browse Offers + + } + iconPosition="left" + > + Just Arrived + +
+ ) +} + +An implementation of the `EmptyState` that represents a Gallery with no items. + + + {TemplateEmptyGallery.bind({})} +