Skip to content

Commit

Permalink
chore: remove query-string dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
andresin87 committed Jan 29, 2024
1 parent 15f5e14 commit 28736a8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 55 deletions.
7 changes: 4 additions & 3 deletions .storybook/preview.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import queryString from 'query-string'
import { DocsContainer } from '@storybook/blocks'
import { withThemeByDataAttribute } from '@storybook/addon-styling'
import { Icon } from '@spark-ui/icon'
Expand Down Expand Up @@ -52,13 +51,15 @@ export const decorators = [
attributeName: 'data-theme',
}),
(storyFn, { id, viewMode }) => {
const { globals } = queryString.parse(window.top?.location.search)
const params = new URLSearchParams(window.top?.location.search)
params.set('id', id)
params.delete('path')
return (
<div className="relative w-full">
{viewMode === 'docs' && (
<div className="absolute -right-lg -top-xl">
<a
href={`/iframe.html?${queryString.stringify({ id, globals })}`}
href={`/iframe.html?${params.toString()}`}
target="_blank"
className="text-basic hover:text-basic-hovered focus:text-basic-focused enabled:active:text-basic-pressed"
>
Expand Down
51 changes: 0 additions & 51 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@
"postcss": "8.4.31",
"prettier": "3.2.4",
"prettier-plugin-tailwindcss": "0.5.11",
"query-string": "^8.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-live": "3.2.0",
Expand Down

0 comments on commit 28736a8

Please sign in to comment.