Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

107
Visualizações
how to change toastify loading bg while updating

I want to change bg-color of the notification. How can I do it .I am using Tailwind as css fram-work.

it shows loading and success/error notification with bg-white

class App extends Component {
  orderHandler = () => {
    toast.loading("Please wait",{
      position: toast.POSITION.TOP_CENTER,
      progressClassName: 'success-progress-bar',
      toastId: 2
    });
    axios
      .get("https://restcountries.com/v3.1/all")
      .then((response) => {
        console.log(response);
        toast.update(2, { render: "done", type: "success", hideProgressBar: true, autoClose:1000, isLoading: false });
      })
      .catch((error) => {
        console.log(error);
        toast.update(2, { render: "error", type: "error", isLoading: false });
      });
  };
  render() {
    return (
      <div>
        <button onClick={this.orderHandler}>click</button>
        <ToastContainer/>
      </div>
    );
  }
}

export default App;
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

you can use below code to change the bg color
method1

<ToastContainer
  toastStyle = {{ backgroundColor: "red", color: "#FFF"}}
/>

method2 In your css file you can write below css style

.Toastify__toast--success {
  background: #00c781 !important;
  color: #FFF !important;
  font-weight: 200;
}

.Toastify__toast--error {
  background: red !important;
  color: #FFF !important;
  font-weight: 200;
}
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda