Skip to content

Commit

Permalink
fix: lazy load ValueSelector to fix Storybook test runner (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsiemens authored Jun 18, 2024
1 parent 89cdc8a commit 4cd501b
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/components/data-entry/QueryItem/ValueSelector.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { type Meta, type StoryObj } from '@storybook/react'
import ValueSelector from './ValueSelector'
import type ValueSelector from './ValueSelector'
import { Suspense, lazy } from 'react'

const _ValueSelector = lazy(async () => await import('./ValueSelector'))

const meta: Meta<typeof ValueSelector> = {
title: 'Aquarium/Data Entry/QueryItem/ValueSelector',
component: ValueSelector,
component: _ValueSelector,
parameters: {
docs: {
description: {
Expand All @@ -12,11 +15,17 @@ const meta: Meta<typeof ValueSelector> = {
},
},
},

decorators: [
Story => (
<Suspense>
<Story />
</Suspense>
),
],
args: {},
}
export default meta

type Story = StoryObj<typeof ValueSelector>

export const DontUseThisOrYouWillBeFired: Story = {}
export const DontUseThisOrYouWillBeFired: Story = {}

0 comments on commit 4cd501b

Please sign in to comment.