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:
@@ -10,7 +10,7 @@ import { WithTooltip, IconButton, TooltipLinkList } from "storybook/internal/com
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { GlobeIcon } from "@storybook/icons";
|
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.
|
* Returns the title of a language in the user's locale.
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ Please see LICENSE files in the repository root for full details.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import type { StorybookConfig } from "@storybook/react-vite";
|
import type { StorybookConfig } from "@storybook/react-vite";
|
||||||
import path from "node:path";
|
|
||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import { nodePolyfills } from "vite-plugin-node-polyfills";
|
import { nodePolyfills } from "vite-plugin-node-polyfills";
|
||||||
import { mergeConfig } from "vite";
|
import { mergeConfig } from "vite";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { ArgTypes, Preview, Decorator, ReactRenderer, StrictArgs } from "@storybook/react-vite";
|
import type { ArgTypes, Preview, Decorator, ReactRenderer, StrictArgs } from "@storybook/react-vite";
|
||||||
|
|
||||||
import "./compound.pcss";
|
import "./compound.css";
|
||||||
import "./preview.css";
|
import "./preview.css";
|
||||||
import React, { useLayoutEffect } from "react";
|
import React, { useLayoutEffect } from "react";
|
||||||
import { setLanguage } from "../src/utils/i18n";
|
import { setLanguage } from "../src/utils/i18n";
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"i18n": "matrix-gen-i18n src && yarn i18n:sort && yarn i18n:lint",
|
"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",
|
"i18n:lint": "matrix-i18n-lint && prettier --log-level=silent --write src/i18n/strings/ --ignore-path /dev/null",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"prepare": "patch-package && vite build",
|
"prepare": "patch-package && vite build",
|
||||||
|
|||||||
@@ -19,6 +19,6 @@
|
|||||||
"jest-matrix-react": ["./src/test/utils/jest-matrix-react"]
|
"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" }]
|
"references": [{ "path": "./tsconfig.node.json" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,9 @@
|
|||||||
"target": "ESNext",
|
"target": "ESNext",
|
||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
|
"esModuleInterop": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
"types": [],
|
||||||
"allowSyntheticDefaultImports": true
|
"allowSyntheticDefaultImports": true
|
||||||
},
|
},
|
||||||
"include": ["vite.config.ts"]
|
"include": ["vite.config.ts"]
|
||||||
|
|||||||
Reference in New Issue
Block a user