@allurereport/web-summary 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,13 +10,7 @@ export const EmptyPlaceholder: FunctionalComponent<EmptyPlaceholderProps> = ({ l
10
10
  return (
11
11
  <div className={styles["empty-placeholder"]}>
12
12
  <div className={styles["empty-placeholder-wrapper"]}>
13
- <SvgIcon
14
- size={"m"}
15
- width={"32px"}
16
- height={"32px"}
17
- id={allureIcons.lineDevCodeSquare}
18
- className={styles["empty-placeholder-icon"]}
19
- />
13
+ <SvgIcon size={"xl"} id={allureIcons.lineDevCodeSquare} className={styles["empty-placeholder-icon"]} />
20
14
  <Text className={styles["empty-placeholder-text"]}>{label}</Text>
21
15
  </div>
22
16
  </div>
@@ -1,20 +1,9 @@
1
- import { IconButton, allureIcons } from "@allurereport/web-components";
2
- import { useEffect } from "preact/hooks";
3
- import { getTheme, themeStore, toggleTheme } from "@/stores/theme";
1
+ import { themeStore, toggleUserTheme } from "@allurereport/web-commons";
2
+ import { ThemeButton as UIThemeButton } from "@allurereport/web-components";
3
+ import { computed } from "@preact/signals";
4
4
 
5
- export const ThemeButton = () => {
6
- const theme = themeStore.value;
7
-
8
- useEffect(() => {
9
- getTheme();
10
- }, []);
5
+ const selectedTheme = computed(() => themeStore.value.selected);
11
6
 
12
- return (
13
- <IconButton
14
- onClick={toggleTheme}
15
- style="ghost"
16
- icon={theme === "light" ? allureIcons.lineShapesMoon : allureIcons.lineShapesSun}
17
- size="s"
18
- />
19
- );
7
+ export const ThemeButton = () => {
8
+ return <UIThemeButton theme={selectedTheme.value} toggleTheme={toggleUserTheme} />;
20
9
  };
package/src/index.tsx CHANGED
@@ -8,7 +8,7 @@ import "@/assets/scss/index.scss";
8
8
  import { EmptyPlaceholder } from "@/components/EmptyPlaceholder";
9
9
  import { Footer } from "@/components/Footer";
10
10
  import { Header } from "@/components/Header";
11
- import { currentLocale, getLocale, getTheme, useI18n, waitForI18next } from "@/stores";
11
+ import { currentLocale, getLocale, useI18n, waitForI18next } from "@/stores";
12
12
  import * as styles from "./styles.scss";
13
13
 
14
14
  export const currentLocaleIso = computed(() => LANG_LOCALE[currentLocale.value]?.iso ?? LANG_LOCALE.en.iso);
@@ -21,7 +21,6 @@ const App = () => {
21
21
 
22
22
  useEffect(() => {
23
23
  getLocale();
24
- getTheme();
25
24
  waitForI18next.then(() => {
26
25
  setLoaded(true);
27
26
  });
@@ -1,2 +1 @@
1
- export * from "./theme";
2
1
  export * from "./locale";