@livelike/react-native
Version:
LiveLike React Native package
19 lines (15 loc) • 451 B
text/typescript
import { PopoverDetail } from '../types';
import { createStore } from './store';
const DEFAULT_POPOVER_DETAIL = {
messageId: '',
popoverType: undefined,
};
export const messageItemPopoverStore = createStore(DEFAULT_POPOVER_DETAIL);
export const messageItemPopoverStoreActions = {
showPopover(args: PopoverDetail) {
messageItemPopoverStore.set(args);
},
hidePopover() {
messageItemPopoverStore.set(DEFAULT_POPOVER_DETAIL);
},
};