From d289c69f36fb3149644c719ccfba30601c4e490c Mon Sep 17 00:00:00 2001 From: eduardoformiga Date: Wed, 15 Jun 2022 19:24:37 -0300 Subject: [PATCH 1/5] Aims to show use cases instead of Related Components section --- .../cart/EmptyCart/EmptyCart.stories.mdx | 44 ------- .../ProductGallery/EmptyGallery.stories.mdx | 50 ------- .../ui/EmptyState/EmptyState.stories.mdx | 123 +++++++++++++----- 3 files changed, 91 insertions(+), 126 deletions(-) delete mode 100644 src/components/cart/EmptyCart/EmptyCart.stories.mdx delete mode 100644 src/components/sections/ProductGallery/EmptyGallery.stories.mdx 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({})} + From b8acda99c3a1bc951a7b84e5235243059803d4d5 Mon Sep 17 00:00:00 2001 From: eduardoformiga Date: Wed, 15 Jun 2022 19:29:07 -0300 Subject: [PATCH 2/5] Adds CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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)) From b776d570efc8e6eaae946d8c231b320c53e3b2a7 Mon Sep 17 00:00:00 2001 From: eduardoformiga Date: Wed, 15 Jun 2022 19:52:54 -0300 Subject: [PATCH 3/5] Trigger CI From 34da892ce057090819015aefa95608834eb480b0 Mon Sep 17 00:00:00 2001 From: eduardoformiga Date: Wed, 15 Jun 2022 20:07:34 -0300 Subject: [PATCH 4/5] Trigger CI From d3f3f47f32b044e75d5b806e4ad9eb3c4c228e75 Mon Sep 17 00:00:00 2001 From: eduardoformiga Date: Wed, 15 Jun 2022 20:12:55 -0300 Subject: [PATCH 5/5] Trigger CI