Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Custom Snackbar Notifications. #315

Open
RobertJSmith opened this issue Jul 16, 2021 · 2 comments
Open

Question: Custom Snackbar Notifications. #315

RobertJSmith opened this issue Jul 16, 2021 · 2 comments

Comments

@RobertJSmith
Copy link

Hi all,

I don't see anything in the documentation but is there anyway to trigger a custom snack bar message programatically? I'm using DropzoneAreaBase with my own onAdd function and I'd like to show different messages for why I've rejected a file.

@RobertJSmith RobertJSmith changed the title Custom Snackbar Norifications. Question: Custom Snackbar Norifications. Jul 16, 2021
@RobertJSmith RobertJSmith changed the title Question: Custom Snackbar Norifications. Question: Custom Snackbar Notifications. Jul 16, 2021
@OLI370
Copy link

OLI370 commented Jul 22, 2021

+1

@hongz1
Copy link

hongz1 commented Sep 22, 2021

You need to read documentation below
https://yuvaleros.github.io/material-ui-dropzone/

you need to customize it by 'alertSnackbarProps'
i.e. if you want to change position

alertSnackbarProps={{ anchorOrigin: { vertical: "top", horizontal: "right" } }}
getFileAddedMessage={(fileName) => ``${fileName} ADDED!``}

There are other functions for each behavior (added, removed, rejected, etc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants