-
Notifications
You must be signed in to change notification settings - Fork 4.1k
/
actions.js
52 lines (49 loc) · 1 KB
/
actions.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/**
* Returns an action object that, when dispatched, presents a guide that takes
* the user through a series of tips step by step.
*
* @param {string[]} tipIds Which tips to show in the guide.
*
* @return {Object} Action object.
*/
export function triggerGuide( tipIds ) {
return {
type: 'TRIGGER_GUIDE',
tipIds,
};
}
/**
* Returns an action object that, when dispatched, dismisses the given tip. A
* dismissed tip will not show again.
*
* @param {string} id The tip to dismiss.
*
* @return {Object} Action object.
*/
export function dismissTip( id ) {
return {
type: 'DISMISS_TIP',
id,
};
}
/**
* Returns an action object that, when dispatched, prevents all tips from
* showing again.
*
* @return {Object} Action object.
*/
export function disableTips() {
return {
type: 'DISABLE_TIPS',
};
}
/**
* Returns an action object that, when dispatched, makes all tips show again.
*
* @return {Object} Action object.
*/
export function enableTips() {
return {
type: 'ENABLE_TIPS',
};
}