-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactions.js
50 lines (43 loc) · 797 Bytes
/
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
const actions =
{
SET_MESSAGE_TEXT: "SET_ERROR_MESSAGE",
SET_MESSAGE_STYLE: "SET_ERROR_STYLE",
SET_MESSAGE_TITLE_TEXT: "SET_MESSAGE_TITLE_TEXT",
SET_MESSAGE_TITLE_CLASS: "SET_MESSAGE_TITLE_CLASS",
CLEAR_MESSAGE: "CLEAR_MESSAGE"
};
export default actions;
export function setMessageText(value)
{
return {
type: actions.SET_MESSAGE_TEXT,
text: value
};
}
export function setMessageClass(value)
{
return {
type: actions.SET_MESSAGE_CLASS,
className: value
};
}
export function setMessageTitleText(value)
{
return {
type: actions.SET_MESSAGE_TITLE_TEXT,
text: value
};
}
export function setMessageTitleClass(value)
{
return {
type: actions.SET_MESSAGE_TITLE_CLASS,
className: value
};
}
export function clearMessage()
{
return {
type: actions.CLEAR_MESSAGE
}
}