tycho-components 0.1.0-SNAPSHOT → 0.1.0-SNAPSHOT-1
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.
- package/dist/configs/useTourUtils.d.ts +5 -0
- package/dist/configs/useTourUtils.js +20 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import CommonContext from './CommonContext';
|
|
3
|
+
import { tour } from './store/actions';
|
|
4
|
+
export const useTourUtils = () => {
|
|
5
|
+
const { state, dispatch } = useContext(CommonContext);
|
|
6
|
+
const turnOn = () => {
|
|
7
|
+
dispatch(tour(true));
|
|
8
|
+
};
|
|
9
|
+
const turnOff = () => {
|
|
10
|
+
dispatch(tour(false));
|
|
11
|
+
};
|
|
12
|
+
const status = () => {
|
|
13
|
+
return state.tour;
|
|
14
|
+
};
|
|
15
|
+
return {
|
|
16
|
+
turnOn,
|
|
17
|
+
turnOff,
|
|
18
|
+
status,
|
|
19
|
+
};
|
|
20
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export { commonResources } from './configs/Localization';
|
|
|
34
34
|
export { useCorpusUtils } from './configs/useCorpusUtils';
|
|
35
35
|
export { useLoggedUtils } from './configs/useLoggedUtils';
|
|
36
36
|
export { useMessageUtils } from './configs/useMessageUtils';
|
|
37
|
+
export { useTourUtils } from './configs/useTourUtils';
|
|
37
38
|
export { UserStatusNames } from './configs/User';
|
|
38
39
|
export type { User, UserStatus } from './configs/User';
|
|
39
40
|
export { default as DateUtils } from './functions/DateUtils';
|
package/dist/index.js
CHANGED
|
@@ -25,6 +25,7 @@ export { commonResources } from './configs/Localization';
|
|
|
25
25
|
export { useCorpusUtils } from './configs/useCorpusUtils';
|
|
26
26
|
export { useLoggedUtils } from './configs/useLoggedUtils';
|
|
27
27
|
export { useMessageUtils } from './configs/useMessageUtils';
|
|
28
|
+
export { useTourUtils } from './configs/useTourUtils';
|
|
28
29
|
export { UserStatusNames } from './configs/User';
|
|
29
30
|
export { default as DateUtils } from './functions/DateUtils';
|
|
30
31
|
export { default as FilterUtils } from './functions/FilterUtils';
|