Back to Storybook

Api Doc Block Source Sort Props

docs/_snippets/api-doc-block-source-sort-props.md

10.5.01.6 KB
Original Source
ts
// Replace your-framework with the framework you are using (e.g., react-vite, nextjs, nextjs-vite)
import type { Preview } from '@storybook/your-framework';

const preview = {
  parameters: {
    jsx: {
      // ๐Ÿ‘‡ Preserve the order in which props are defined, instead of sorting them alphabetically
      sortProps: false,
    },
  },
} satisfies Preview;

export default preview;
js
export default {
  parameters: {
    jsx: {
      // ๐Ÿ‘‡ Preserve the order in which props are defined, instead of sorting them alphabetically
      sortProps: false,
    },
  },
};
ts
// Replace your-framework with the framework you are using (e.g., react-vite, nextjs, nextjs-vite)
import { definePreview } from '@storybook/your-framework';

export default definePreview({
  parameters: {
    jsx: {
      // ๐Ÿ‘‡ Preserve the order in which props are defined, instead of sorting them alphabetically
      sortProps: false,
    },
  },
});
js
// Replace your-framework with the framework you are using (e.g., react-vite, nextjs, nextjs-vite)
import { definePreview } from '@storybook/your-framework';

export default definePreview({
  parameters: {
    jsx: {
      // ๐Ÿ‘‡ Preserve the order in which props are defined, instead of sorting them alphabetically
      sortProps: false,
    },
  },
});