docs/_snippets/api-doc-block-source-sort-props.md
// 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;
export default {
parameters: {
jsx: {
// ๐ Preserve the order in which props are defined, instead of sorting them alphabetically
sortProps: false,
},
},
};
// 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,
},
},
});
// 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,
},
},
});