ados-rcm 1.0.428 → 1.0.430

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.
@@ -31,12 +31,48 @@ export type TThemeKeys = keyof typeof DefaultTheme;
31
31
  export interface ITheme extends TSemantic {
32
32
  '--ThemeName': string;
33
33
  }
34
+ /**
35
+ * getThemeNames
36
+ *
37
+ * Description: Get all theme names. 'Default', 'Dark' are given by default.
38
+ */
34
39
  declare function getThemeNames(): string[];
40
+ /**
41
+ * getTheme
42
+ *
43
+ * Description: Get the theme object by theme name.
44
+ */
35
45
  declare function getTheme(themeName: string): ITheme | undefined;
46
+ /**
47
+ * getCurrentThemeName
48
+ *
49
+ * Description: Get the current theme name.
50
+ */
36
51
  declare function getCurrentThemeName(): string;
52
+ /**
53
+ * getCurrentTheme
54
+ *
55
+ * Description: Get the current theme object.
56
+ */
37
57
  declare function getCurrentTheme(): ITheme | undefined;
58
+ /**
59
+ * addTheme
60
+ *
61
+ * Description: Add a new theme to the internal theme list.
62
+ */
38
63
  declare function addTheme(theme: ITheme): void;
64
+ /**
65
+ * removeTheme
66
+ *
67
+ * Description: Remove a theme from the internal theme list.
68
+ * you can not remove the last theme.
69
+ */
39
70
  declare function removeTheme(themeName: string): void;
71
+ /**
72
+ * unsetTheme
73
+ *
74
+ * Description: Unset the theme by removing all properties from the document.
75
+ */
40
76
  declare function unsetTheme(themeName: string): void;
41
77
  declare function setTheme(themeName: string): void;
42
78
  declare function editTheme(themeName: string, theme: Partial<ITheme>): void;
@@ -0,0 +1,8 @@
1
+ import { RefObject } from 'react';
2
+ import { ITheme } from '../AComponents/ATheme/ATheme';
3
+ /**
4
+ * useTheme(experimental)
5
+ *
6
+ * Description: Set local theme to the element. It will affect the element and the children of the element.
7
+ */
8
+ export declare function useTheme(ref: RefObject<HTMLElement>, theme: Partial<ITheme>): void;