Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: clarifying story names for hero components #495

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/vue-storybook/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const preview: Preview = {
'Blocks',
['Overview', 'Heroes', ['Overview', 'Small', 'Medium', 'Large']],
'Heroes',
['Overview', 'HeroSmall', 'HeroMedium', 'HeroLarge', 'HeroMedia', 'HeroListingIndex'],
['Overview', 'Small', 'Medium', 'Large', 'Media Only', 'HeroListingIndex'],
'Forms',
['Overview', 'TextInput', 'TextArea'],
'Search',
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/components/HeroLarge/HeroLarge.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import HeroLarge from './HeroLarge.vue'

export default {
title: 'Components/Heroes/HeroLarge',
title: 'Components/Heroes/Large',
component: HeroLarge,
excludeStories: /.*Data$/,
parameters: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import HeroListingIndex from './HeroListingIndex.vue'

export default {
title: 'Components/Heroes/HeroListingIndex',
title: 'Components/Heroes/For Listing Pages',
component: HeroListingIndex,
parameters: {
viewMode: 'canvas'
Expand Down Expand Up @@ -38,6 +38,7 @@ export const HeroListingIndexData = {
// templates

export const BaseStory = {
name: 'HeroListingIndex',
args: {
customLabel: 'Featured',
pageData: HeroListingIndexData.listingPage
Expand Down
4 changes: 2 additions & 2 deletions packages/vue/src/components/HeroMedia/HeroMedia.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { BaseVideoData } from './../BaseVideo/BaseVideo.stories'
import HeroMedia from './HeroMedia.vue'

export default {
title: 'Components/Heroes/HeroMedia',
title: 'Components/Heroes/Media Only',
component: HeroMedia,
parameters: {
html: {
Expand Down Expand Up @@ -79,7 +79,7 @@ export const HeroMediaData = {

// stories
export const BaseStory = {
name: 'Hero',
name: 'HeroMedia',
args: HeroMediaData
}
export const CustomImageCaption = {
Expand Down
3 changes: 2 additions & 1 deletion packages/vue/src/components/HeroMedium/HeroMedium.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { BaseVideoData } from './../BaseVideo/BaseVideo.stories'
import HeroMedium from './HeroMedium.vue'

export default {
title: 'Components/Heroes/HeroMedium',
title: 'Components/Heroes/Medium',
component: HeroMedium,
decorators: [
() => ({
Expand Down Expand Up @@ -55,6 +55,7 @@ export const HeroMediumData = {
}

export const BaseStory = {
name: 'HeroMedium',
args: {
customTag: 'News',
customLabel: HeroMediumData.label,
Expand Down
3 changes: 2 additions & 1 deletion packages/vue/src/components/HeroMedium/HeroSmall.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { HeroMediumData } from './HeroMedium.stories'
import HeroMedium from './HeroMedium.vue'

export default {
title: 'Components/Heroes/HeroSmall',
title: 'Components/Heroes/Small',
component: HeroMedium,
decorators: [
() => ({
Expand Down Expand Up @@ -36,6 +36,7 @@ export default {
}

export const BaseStory = {
name: 'HeroMedium (compact)',
args: {
customTag: 'News',
customLabel: HeroMediumData.label,
Expand Down
17 changes: 13 additions & 4 deletions packages/vue/src/docs/overviews/heroes.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as HeroSmallStories from './../../components/HeroMedium/HeroSmall.stori
import * as HeroMediumStories from './../../components/HeroMedium/HeroMedium.stories'
import * as HeroLargeStories from './../../components/HeroLarge/HeroLarge.stories'
import * as HeroMediaStories from './../../components/HeroMedia/HeroMedia.stories'
import * as HeroListingIndexStories from './../../components/HeroListingIndex/HeroListingIndex.stories'

<Meta title="Components/Heroes/Overview" />

Expand All @@ -16,14 +17,14 @@ Hero components are reserved for usage at the top of the page. There should only
{
heading: 'Small',
meta: HeroSmallStories,
path: '/story/components-heroes-herosmall--base-story',
path: '/story/components-heroes-small--base-story',
fullWidth: true,
fullCanvas: true
},
{
heading: 'Medium',
meta: HeroMediumStories,
path: '/story/components-heroes-heromedium--base-story',
path: '/story/components-heroes-medium--base-story',
fullWidth: true,
fullCanvas: true
},
Expand All @@ -32,14 +33,22 @@ Hero components are reserved for usage at the top of the page. There should only
customDescription:
'Includes a large text overlay that works best with background images that have a focal point on the right side of the image.',
meta: HeroLargeStories,
path: '/story/components-heroes-herolarge--base-story',
path: '/story/components-heroes-large--base-story',
fullWidth: true,
fullCanvas: true
},
{
heading: 'Media Only',
meta: HeroMediaStories,
path: '/docs/components-heroes-heromedia--docs',
path: '/docs/components-heroes-media-only--docs',
fullWidth: true,
fullCanvas: true,
canvasClass: 'sbdocs-inline-height'
},
{
heading: 'For Listing Pages',
meta: HeroListingIndexStories,
path: '/docs/components-heroes-for-listing-pages--docs',
fullWidth: true,
fullCanvas: true,
canvasClass: 'sbdocs-inline-height'
Expand Down
Loading