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.js 925B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // @flow
  2. import {
  3. SET_SIDEBAR_VISIBLE,
  4. SET_WELCOME_PAGE_LIST_DEFAULT_PAGE
  5. } from './actionTypes';
  6. /**
  7. * Action to update the default page index of the {@code WelcomePageLists}
  8. * component.
  9. *
  10. * @param {number} pageIndex - The index of the selected page.
  11. * @returns {{
  12. * type: SET_WELCOME_PAGE_LIST_DEFAULT_PAGE,
  13. * pageIndex: number
  14. * }}
  15. */
  16. export function setWelcomePageListDefaultPage(pageIndex: number) {
  17. return {
  18. type: SET_WELCOME_PAGE_LIST_DEFAULT_PAGE,
  19. pageIndex
  20. };
  21. }
  22. /**
  23. * Sets the visibility of {@link WelcomePageSideBar}.
  24. *
  25. * @param {boolean} visible - If the {@code WelcomePageSideBar} is to be made
  26. * visible, {@code true}; otherwise, {@code false}.
  27. * @returns {{
  28. * type: SET_SIDEBAR_VISIBLE,
  29. * visible: boolean
  30. * }}
  31. */
  32. export function setSideBarVisible(visible: boolean) {
  33. return {
  34. type: SET_SIDEBAR_VISIBLE,
  35. visible
  36. };
  37. }