import {
SnackbarProvider,
EnqueueSnackbarProps,
useSnackbar,
Button,
Center,
} from '@arctic-kit/snow';
function Demo({ enqueueProps }: { enqueueProps: EnqueueSnackbarProps }) {
const { enqueueSnackbar, closeSnackbar } = useSnackbar();
return (
<Center>
<Button onClick={() => enqueueSnackbar(enqueueProps)}>
Show notification
</Button>
<Button color='secondary' onClick={() => closeSnackbar()}>
Close all
</Button>
</Center>
);
}
function RootApp(props: EnqueueSnackbarProps) {
return (
<SnackbarProvider>
<Demo
enqueueProps={{
variant:"info",
title:"Notification received",
message:"Lorem ipsum dolor sit amet, consectetur adipiscing elit"
}}
/>
</SnackbarProvider>
);
}