bigbuffet-rw/app/soapbox/actions/dropdown_menu.ts
marcin mikołajczak cfacc23f5c Actions: TypeScript
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-06-15 22:11:36 +02:00

17 lines
507 B
TypeScript

import type { DropdownPlacement } from 'soapbox/components/dropdown_menu';
const DROPDOWN_MENU_OPEN = 'DROPDOWN_MENU_OPEN';
const DROPDOWN_MENU_CLOSE = 'DROPDOWN_MENU_CLOSE';
const openDropdownMenu = (id: number, placement: DropdownPlacement, keyboard: boolean) =>
({ type: DROPDOWN_MENU_OPEN, id, placement, keyboard });
const closeDropdownMenu = (id: number) =>
({ type: DROPDOWN_MENU_CLOSE, id });
export {
DROPDOWN_MENU_OPEN,
DROPDOWN_MENU_CLOSE,
openDropdownMenu,
closeDropdownMenu,
};