Skip to content

[v4] feature: close button icon for toasts #16237

Closed

Description

@simonhaenisch

Feature Request

Ionic Info

"@ionic/core": "4.0.0-beta.15"

Describe the Feature Request

Add an option closeButtonIcon: string to ToastOptions that renders an icon instead of closeButtonText, or next to the closeButtonText.

Describe Preferred Solution

I mainly want to modify this part of the ion-toast template

https://github.com/ionic-team/ionic/blob/fda48a0e52556ca624e9641adbe851ebbd7ea92d/core/src/components/toast/toast.tsx#L206-L210

to something like this:

<ion-button>
  {this.closeButtonIcon && (
    <ion-icon name={this.closeButtonIcon} slot={this.closeButtonText ? 'end' : 'icon-only'} />
  )}
  {this.closeButtonText || (this.closeButtonIcon ? '' : 'Close')}
</ion-button>

Describe Alternatives

None?

Additional Context

I'll make a PR for this, just don't have the time right now, and wanted to have a reminder for myself...

Activity

  1. added
    type: feature request
    and removed on Dec 7, 2018
  2. zakton5 commented on Jan 17, 2019

    @zakton5
    Contributor

    @simonhaenisch Check out #17147. Do you think that will work for you?

  3. ionitron-bot commented on May 11, 2019

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  4. locked and limited conversation to collaborators on May 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: feature request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions