Skip to content

Commit

Permalink
docs: include names in storybook sorting so documentation pages are c…
Browse files Browse the repository at this point in the history
…onsidered
  • Loading branch information
tibuurcio committed Jan 17, 2025
1 parent fd92a56 commit 7824fc5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
11 changes: 4 additions & 7 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
import type { Preview } from '@storybook/react'
// import type { IndexEntry } from '@storybook/types'

const preview: Preview = {
parameters: {
layout: 'centered',
options: {
// TODO https://mparticle-eng.atlassian.net/browse/UNI-1214
// storySort: (a: IndexEntry, b: IndexEntry) => {
// console.log('Ordering stories', { a, b })
// const order = ['Documentation', 'Cell Types', 'Filters', 'Primary', 'Complex']
// return order.indexOf(a[1].name) - order.indexOf(b[1].name)
// },
storySort: {
method: 'alphabetical',
includeNames: true,
order: [
'About',
['Introduction', 'Changelog', 'Feedback', 'Component Process'],
Expand All @@ -21,7 +16,9 @@ const preview: Preview = {
[
'Data Display',
'Data Entry',
['QueryItem', ['Documentation']],
'General',
['Button', ['Documentation']],
'Feedback',
'Layout',
'Navigation',
Expand Down
2 changes: 1 addition & 1 deletion src/components/data-display/Badge/Badge.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const DotBadge: Story = {
},
}

export const BadgeStatus: Story = {
export const StatusBadge: Story = {
argTypes: {
status: {
control: 'select',
Expand Down
4 changes: 2 additions & 2 deletions src/components/data-entry/DatePicker/DatePicker.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ type Story = StoryObj<typeof DatePicker>

export const Primary: Story = {}

export const WithDatePickerWithDisabledYears: Story = {
export const WithDisabledYears: Story = {
render: () => <DatePickerWithDisabledYears />,
}

WithDatePickerWithDisabledYears.parameters = {
WithDisabledYears.parameters = {
docs: {
source: {
code: `
Expand Down

0 comments on commit 7824fc5

Please sign in to comment.