Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

actions.tsx 684B

12345678910111213141516171819202122232425262728293031
  1. import { ReactElement } from 'react';
  2. import { HIDE_TOOLTIP, SHOW_TOOLTIP } from './actionTypes';
  3. /**
  4. * Set tooltip state to visible.
  5. *
  6. * @param {string} content - The content of the tooltip.
  7. * Used as unique identifier for tooltip.
  8. * @returns {Object}
  9. */
  10. export function showTooltip(content: string | ReactElement) {
  11. return {
  12. type: SHOW_TOOLTIP,
  13. content
  14. };
  15. }
  16. /**
  17. * Set tooltip state to hidden.
  18. *
  19. * @param {string} content - The content of the tooltip.
  20. * Used as unique identifier for tooltip.
  21. * @returns {Object}
  22. */
  23. export function hideTooltip(content: string | ReactElement) {
  24. return {
  25. type: HIDE_TOOLTIP,
  26. content
  27. };
  28. }