diff --git a/.storybook/preview.jsx b/.storybook/preview.jsx index f16f46663..4cb807d3e 100644 --- a/.storybook/preview.jsx +++ b/.storybook/preview.jsx @@ -1,12 +1,12 @@ -import '../src/tailwind.css' -import './sb-theming.css' -import { ToC } from '@docs/helpers/ToC' - import { DocsContainer } from '@storybook/blocks' import { withThemeByDataAttribute } from '@storybook/addon-styling' import { Icon } from '@spark-ui/icon' import { ShareExpand } from '@spark-ui/icons/dist/icons/ShareExpand' +import '../src/tailwind.css' +import './sb-theming.css' +import { ToC } from '@docs/helpers/ToC' + const ExampleContainer = ({ children, ...props }) => { return ( @@ -51,12 +51,15 @@ export const decorators = [ attributeName: 'data-theme', }), (storyFn, { id, viewMode }) => { + const params = new URLSearchParams(window.top?.location.search) + params.set('id', id) + params.delete('path') return (
{viewMode === 'docs' && (
diff --git a/package-lock.json b/package-lock.json index 1a3400820..63f51b541 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2399,6 +2399,7 @@ }, "node_modules/@clack/prompts/node_modules/is-unicode-supported": { "version": "1.3.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": {