forked from Ivasoft/mattermost-mobile
* styling mobile wip * styling tablet wip tablet portrait * removed offSetY * Update en.json * corrections from reviews * removed space * changed location to sourceScreen in post.tsx * adjust width * update message to text * adding PanGesture adding PanGesture- wip PanGesture- wip * able to touch through on iOS * using EphemeralStore and listeners to discard overlays * snack positioning and touches * PanGesture- wip * PanGesture- fine tuning the animation PanGesture- wip * removed toast keyword * checks for ongoing animation * dismiss overlay on navigating away * dismiss overlay on navigating away * dismiss overlay on tabPress * dismiss overlay on tabPress * cancelled timers on panning start * add entering layoutAnimation * add exitingg layoutAnimation * fix layoutAnimation * fix styling * eslint fix * style fix * fix timer not stopping * revert changes made to the ephemeral store * bumping the toast vertically by 4px Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
17 lines
546 B
TypeScript
17 lines
546 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
import {Screens} from '@constants';
|
|
import {SNACK_BAR_TYPE} from '@constants/snack_bar';
|
|
import {showOverlay} from '@screens/navigation';
|
|
|
|
type ShowSnackBarArgs = {
|
|
barType: keyof typeof SNACK_BAR_TYPE;
|
|
onPress?: () => void;
|
|
sourceScreen?: typeof Screens[keyof typeof Screens];
|
|
};
|
|
|
|
export const showSnackBar = (passProps: ShowSnackBarArgs) => {
|
|
const screen = Screens.SNACK_BAR;
|
|
showOverlay(screen, passProps);
|
|
};
|