mirror of
https://github.com/vector-im/element-web.git
synced 2026-03-06 14:02:24 +01:00
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:
parent
6b48b022cb
commit
2de53e306a
@ -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.
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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" }]
|
||||
}
|
||||
|
||||
@ -4,7 +4,9 @@
|
||||
"target": "ESNext",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"esModuleInterop": true,
|
||||
"strict": true,
|
||||
"types": [],
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user