actions/status-hover-card: convert to TypeScript

This commit is contained in:
Alex Gleason 2022-06-20 16:55:08 -05:00
parent 2d3d834a83
commit 3bbc4cffe8
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,27 @@
const STATUS_HOVER_CARD_OPEN = 'STATUS_HOVER_CARD_OPEN';
const STATUS_HOVER_CARD_UPDATE = 'STATUS_HOVER_CARD_UPDATE';
const STATUS_HOVER_CARD_CLOSE = 'STATUS_HOVER_CARD_CLOSE';
const openStatusHoverCard = (ref: React.MutableRefObject<HTMLDivElement>, statusId: string) => ({
type: STATUS_HOVER_CARD_OPEN,
ref,
statusId,
});
const updateStatusHoverCard = () => ({
type: STATUS_HOVER_CARD_UPDATE,
});
const closeStatusHoverCard = (force = false) => ({
type: STATUS_HOVER_CARD_CLOSE,
force,
});
export {
STATUS_HOVER_CARD_OPEN,
STATUS_HOVER_CARD_UPDATE,
STATUS_HOVER_CARD_CLOSE,
openStatusHoverCard,
updateStatusHoverCard,
closeStatusHoverCard,
};