From 88310bffd158784cdea1663e5485387a7f5f01d3 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Thu, 9 May 2024 17:27:44 +0200 Subject: [PATCH] chore: fix broken TreeListing storybook (#88) --- src/TreeListing/TreeListing.stories.tsx | 33 ++++--------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/src/TreeListing/TreeListing.stories.tsx b/src/TreeListing/TreeListing.stories.tsx index f4c7761..2f0371a 100644 --- a/src/TreeListing/TreeListing.stories.tsx +++ b/src/TreeListing/TreeListing.stories.tsx @@ -1,13 +1,9 @@ -import type { Decorator, Meta, StoryObj } from "@storybook/react"; +import type { Meta, StoryObj } from "@storybook/react"; import React from "react"; import { fullFit } from "../../.storybook/fits"; -import { TreeListing } from "./"; -import { EsiProvider } from "../EsiProvider"; -import { EveDataProvider } from "../EveDataProvider"; -import { EsiFit, ShipSnapshotProvider } from "../ShipSnapshotProvider"; -import { DogmaEngineProvider } from "../DogmaEngineProvider"; +import { TreeHeader, TreeListing } from "./"; const meta: Meta = { component: TreeListing, @@ -18,31 +14,12 @@ const meta: Meta = { export default meta; type Story = StoryObj; -const withEsiProvider: Decorator<{ changeHull: (typeId: number) => void; changeFit: (fit: EsiFit) => void }> = ( - Story, - context, -) => { - return ( - - - - -
- -
-
-
-
-
- ); -}; - export const Default: Story = { args: { - changeHull: (typeId: number) => console.log(`changeHull(${typeId})`), - changeFit: (fit: EsiFit) => console.log(`changeFit(${fit})`), + getChildren: () =>
Test
, + header: , + level: 0, }, - decorators: [withEsiProvider], parameters: { snapshot: { fit: fullFit,