project setup
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { ReactNode } from "react";
|
||||
import { Portal, Snackbar, SnackbarProps } from "react-native-paper";
|
||||
|
||||
interface AppSnackbarProps extends SnackbarProps {
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
export const AppSnackbar = ({
|
||||
visible,
|
||||
onDismiss,
|
||||
action,
|
||||
wrapperStyle,
|
||||
duration,
|
||||
children,
|
||||
}: AppSnackbarProps) => {
|
||||
return (
|
||||
<Portal>
|
||||
<Snackbar
|
||||
visible={visible}
|
||||
onDismiss={onDismiss}
|
||||
action={action}
|
||||
duration={duration}
|
||||
wrapperStyle={[{ zIndex: 1001 }, wrapperStyle]}
|
||||
>
|
||||
{children}
|
||||
</Snackbar>
|
||||
</Portal>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user