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

How to change the position of the toast? #187

Open
t0mos opened this issue Oct 30, 2020 · 1 comment
Open

How to change the position of the toast? #187

t0mos opened this issue Oct 30, 2020 · 1 comment

Comments

@t0mos
Copy link

t0mos commented Oct 30, 2020

I want to make it closer to the top right corner.
By default the positioning is

`  &.top-right {
    top: 10%;
    right: 7%;
  }`

I want to make it

  &.top-right {
    top: 2%;
    right: 2%;
  }

but I am struggling with overwriting the code.

@Mayo89
Copy link

Mayo89 commented Nov 24, 2020

I had the same issue, I was trying to use scoped styles in a component but I believe as the toast is not part of the component these are not applied.

You can set the containerClass on your toast and then style in some global css file.

this.$toasted.show(x.response.data, {
    containerClass: "toastContainer",
});
.toasted-container.toastContainer.top-right {
	top: 0%;
	right: 1%;
}

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

2 participants