Tidy shared-components storybook (#31836)

* Fix compound.css - it is not pcss

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Improve types in shared-components storybook

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update i18n:sort script and remove patch-package

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2026-01-21 15:22:13 +00:00 committed by GitHub
parent 6b48b022cb
commit 2de53e306a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 6 additions and 5 deletions

View File

@ -10,7 +10,7 @@ import { WithTooltip, IconButton, TooltipLinkList } from "storybook/internal/com
import React from "react";
import { GlobeIcon } from "@storybook/icons";
const languages = JSON.parse(process.env.STORYBOOK_LANGUAGES);
const languages: string[] = JSON.parse(process.env.STORYBOOK_LANGUAGES!);
/**
* Returns the title of a language in the user's locale.

View File

@ -6,7 +6,6 @@ Please see LICENSE files in the repository root for full details.
*/
import type { StorybookConfig } from "@storybook/react-vite";
import path from "node:path";
import fs from "node:fs";
import { nodePolyfills } from "vite-plugin-node-polyfills";
import { mergeConfig } from "vite";

View File

@ -1,6 +1,6 @@
import type { ArgTypes, Preview, Decorator, ReactRenderer, StrictArgs } from "@storybook/react-vite";
import "./compound.pcss";
import "./compound.css";
import "./preview.css";
import React, { useLayoutEffect } from "react";
import { setLanguage } from "../src/utils/i18n";

View File

@ -36,7 +36,7 @@
],
"scripts": {
"i18n": "matrix-gen-i18n src && yarn i18n:sort && yarn i18n:lint",
"i18n:sort": "jq --sort-keys '.' src/i18n/strings/en_EN.json > src/i18n/strings/en_EN.json.tmp && mv src/i18n/strings/en_EN.json.tmp src/i18n/strings/en_EN.json",
"i18n:sort": "matrix-sort-i18n src/i18n/strings/en_EN.json",
"i18n:lint": "matrix-i18n-lint && prettier --log-level=silent --write src/i18n/strings/ --ignore-path /dev/null",
"test": "jest",
"prepare": "patch-package && vite build",

View File

@ -19,6 +19,6 @@
"jest-matrix-react": ["./src/test/utils/jest-matrix-react"]
}
},
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
"include": ["./src/**/*.ts", "./src/**/*.tsx", ".storybook/*.ts", ".storybook/*.tsx"],
"references": [{ "path": "./tsconfig.node.json" }]
}

View File

@ -4,7 +4,9 @@
"target": "ESNext",
"module": "esnext",
"moduleResolution": "bundler",
"esModuleInterop": true,
"strict": true,
"types": [],
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]