Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70448

Ionic 4 - How to change Toast button's style?

$
0
0

@lele12513 wrote:

Hello there,
I have a custom button in toast, and I added cssClass to it, but I don’t know how to modify the button’s style, such as background-color, padding, width, etc.

A component contains the following code:

        this.toastInstance = await this.toastCtrl.create({
            cssClass: "custom-toast-error",
            duration: 0,
            showCloseButton: false,
            closeButtonText: "Close",
            position: "bottom",
            buttons: [{
                text: "",
                icon: "ios-close-circle",
                side: "start",
                cssClass: "custom-toast-error-button"
            }]
        });

I know how to modify the style of toast by’.custom-toast-error’, but I can’t modify the style of button by’.custom-toast-error-button’.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70448

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>