You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

actions.native.js 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // @flow
  2. import {
  3. SET_FILMSTRIP_ENABLED,
  4. SET_FILMSTRIP_HOVERED,
  5. SET_FILMSTRIP_VISIBLE
  6. } from './actionTypes';
  7. /**
  8. * Sets whether the filmstrip is enabled.
  9. *
  10. * @param {boolean} enabled - Whether the filmstrip is enabled.
  11. * @returns {{
  12. * type: SET_FILMSTRIP_ENABLED,
  13. * enabled: boolean
  14. * }}
  15. */
  16. export function setFilmstripEnabled(enabled: boolean) {
  17. return {
  18. type: SET_FILMSTRIP_ENABLED,
  19. enabled
  20. };
  21. }
  22. /**
  23. * Sets whether the filmstrip is being hovered (over).
  24. *
  25. * @param {boolean} hovered - Whether the filmstrip is being hovered (over).
  26. * @returns {{
  27. * type: SET_FILMSTRIP_HOVERED,
  28. * hovered: boolean
  29. * }}
  30. */
  31. export function setFilmstripHovered(hovered: boolean) {
  32. return {
  33. type: SET_FILMSTRIP_HOVERED,
  34. hovered
  35. };
  36. }
  37. /**
  38. * Sets whether the filmstrip is visible.
  39. *
  40. * @param {boolean} visible - Whether the filmstrip is visible.
  41. * @returns {{
  42. * type: SET_FILMSTRIP_VISIBLE,
  43. * visible: boolean
  44. * }}
  45. */
  46. export function setFilmstripVisible(visible: boolean) {
  47. return {
  48. type: SET_FILMSTRIP_VISIBLE,
  49. visible
  50. };
  51. }