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

Toast custom HTML with templates #457

Merged
merged 3 commits into from
May 21, 2024
Merged

Conversation

danice
Copy link

@danice danice commented Feb 27, 2024

Proposed changes

Toast custom HTML allows templates.

This allows to generate multiple toast for same element, that was not possible if the Id is an html element.

comments:

  1. I have maintained compatibility with the id as an html element (see pressing 'Toast 2' button), but this the disadvantage that only 1 element is created, so I propose to remove that and change the 'toastId' to 'templateId'
  2. also maybe it would be nice add some event to allow the user to modify the created template elements

Screenshots (if appropriate) or codepen:

imagen

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to change).

Checklist:

  • I have read the CONTRIBUTING document.
  • My commit messages follows the conventional commit format
  • My change requires a change to the documentation, and updated it accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@wuda-io
Copy link
Member

wuda-io commented Apr 4, 2024

Hey @danice. Why is this a draft?

@danice danice marked this pull request as ready for review April 5, 2024 06:30
@danice
Copy link
Author

danice commented Apr 5, 2024

Hey @danice. Why is this a draft?

That was unintended. Set as "Open"...

Copy link
Member

@wuda-io wuda-io left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wuda-io wuda-io merged commit 2a2dd9b into materializecss:v2-dev May 21, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants