Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

actions.any.js 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // @flow
  2. import {
  3. SET_TOOLBOX_ALWAYS_VISIBLE,
  4. SET_TOOLBOX_ENABLED,
  5. SET_TOOLBOX_VISIBLE
  6. } from './actionTypes';
  7. /**
  8. * Signals that always visible toolbars value should be changed.
  9. *
  10. * @param {boolean} alwaysVisible - Value to be set in redux store.
  11. * @returns {{
  12. * type: SET_TOOLBOX_ALWAYS_VISIBLE,
  13. * alwaysVisible: boolean
  14. * }}
  15. */
  16. export function setToolboxAlwaysVisible(alwaysVisible: boolean): Object {
  17. return {
  18. type: SET_TOOLBOX_ALWAYS_VISIBLE,
  19. alwaysVisible
  20. };
  21. }
  22. /**
  23. * Enables/disables the toolbox.
  24. *
  25. * @param {boolean} enabled - True to enable the toolbox or false to disable it.
  26. * @returns {{
  27. * type: SET_TOOLBOX_ENABLED,
  28. * enabled: boolean
  29. * }}
  30. */
  31. export function setToolboxEnabled(enabled: boolean): Object {
  32. return {
  33. type: SET_TOOLBOX_ENABLED,
  34. enabled
  35. };
  36. }
  37. /**
  38. * Shows/hides the toolbox.
  39. *
  40. * @param {boolean} visible - True to show the toolbox or false to hide it.
  41. * @returns {{
  42. * type: SET_TOOLBOX_VISIBLE,
  43. * visible: boolean
  44. * }}
  45. */
  46. export function setToolboxVisible(visible: boolean): Object {
  47. return {
  48. type: SET_TOOLBOX_VISIBLE,
  49. visible
  50. };
  51. }