Skip to content

Commit fa3ab8a

Browse files
fix: always show badge fully also in disabled tabs (#399)
[Storybook Link](https://wandelbotsgmbh.github.io/wandelbots-js-react-components/overview.html)
1 parent 2c0dd0f commit fa3ab8a

File tree

6 files changed

+2721
-1425
lines changed

6 files changed

+2721
-1425
lines changed

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { Indexer } from "storybook/internal/types"
55
import {
66
generateRobotStories,
77
robotStoryGenerationVitePlugin,
8-
} from "./robotStoryGeneration"
8+
} from "./robotStoryGeneration.ts"
99

1010
const config: StorybookConfig = {
1111
stories: [

.storybook/robotStoryGeneration.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { createUnplugin } from "unplugin"
33
import { glob } from "glob"
44
import fs from "node:fs/promises"
55
import path from "node:path"
6-
import dedent from "ts-dedent"
6+
import { fileURLToPath } from "node:url"
7+
import { dedent } from "ts-dedent"
78

89
export const ROBOT_STORIES_REGEX = /SupportedModels.stories.tsx$/
910

@@ -14,16 +15,17 @@ const HIDDEN_ROBOTS = [
1415
"KUKA_KR210_R2700",
1516
"FANUC_M20iD35",
1617
"YASKAWA_TURN2",
17-
"KUKA_DKP500_2"
18+
"KUKA_DKP500_2",
1819
]
1920

2021
/** Generates lines of CSF code defining stories for each robot model .glb file */
2122
export const generateRobotStories = async () => {
23+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
2224
const modelsDir = path.resolve(__dirname, "../public/models")
2325
const modelFiles = await glob(path.join(modelsDir, "*.glb"))
2426

2527
const importStanza = dedent`
26-
import { robotStory } from "./robotStoryConfig"
28+
import { robotStory } from "./robotStoryConfig.tsx"
2729
`
2830

2931
const modelCsfAdditions: string[] = []

0 commit comments

Comments
 (0)