Skip to content

Commit

Permalink
Merge branch 'v2-dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
wuda-io committed Feb 2, 2024
2 parents 22d6424 + aba8951 commit a5dfd08
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 43 deletions.
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "packages/materialize"]
path = packages/materialize
url = https://github.com/materializecss/materialize.git
branch = v2-dev
6 changes: 5 additions & 1 deletion partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
/>
<link rel="icon" href="images/favicon/favicon-32x32.png" sizes="32x32" />
<!-- Android 5 Chrome Color-->
<meta name="theme-color" content="#EE6E73" />
<!--<meta name="theme-color" content="#EE6E73" />-->
<style>
@import url("https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i,900,900i");
</style>

<!-- CSS-->
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
Expand Down
69 changes: 27 additions & 42 deletions toasts.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,34 +64,12 @@ <h3 class="header">Options</h3>
<td>The content of the Toast.</td>
</tr>
<tr>
<td>unsafeHTML</td>
<td>String, HTMLElement</td>
<td>''</td>
<td>
HTML content that will be appended to to
<code class="language-javascript">text</code>. Only use
properly sanitized or otherwise trusted data for
<code class="language-javascript">unsafeHTML</code>.
</td>
</tr>
<tr>
<td>html</td>
<td>toastId</td>
<td>String</td>
<td>''</td>
<td>
<p>
(DEPRECATED): will be removed in a later release.
</p>
<p>
HTML content that will be appended to
<code class="language-javascript">text</code>. Only use
properly sanitized or otherwise trusted data for
<code class="language-javascript">html</code>.
</p>
<p>
Will be ignored if
<code class="language-javascript">unsafeHTML</code> is
set.
Id of an HTML element that will be used as tootip content.
</p>
</td>
</tr>
Expand Down Expand Up @@ -180,27 +158,34 @@ <h3 class="header">Properties</h3>
<div id="custom-html" class="section scrollspy">
<h3 class="header">Custom HTML</h3>
<p>
You can pass in an HTML String as the first argument as well.
Take a look at the example below, where we pass in text as well
as a flat button. If you call an external function instead of
in-line JavaScript, you will not need to escape quotation marks.
</p>
<p>
Only use a properly sanitized or otherwise trusted HTML string.
</p>
You can pass in an toastId as the argument as well.
This toastId should refer to some element in the HTML that will be used as toast content.
</p>
<button
type="button"
class="waves-effect waves-light btn"
onclick="displayCustomHTMLToast()"
>
Toast with Action
type="button"
class="waves-effect waves-light btn"
onclick="M.toast({toastId: 'my-toast-1'})"
>Toast 1!
</button>
<pre><code class="language-javascript">
var toastHTML = '&lt;span>I am toast content&lt;/span>&lt;button class="btn-flat toast-action">Undo&lt;/button>';
M.toast({unsafeHTML: toastHTML});
</code></pre>
<div id="my-toast-1" style="display: none;">
This is toast nº1 with a
<a href="https://github.com/materializecss"> link </a>
</div>
<button
type="button"
class="waves-effect waves-light btn"
onclick="M.toast({toastId: 'my-toast-2', classes: 'primary'})"
>Toast 2!
</button>
<div id="my-toast-2" style="display: none;">
This is toast nº2 with a <i class="material-icons icon-demo">insert_chart</i>
</div>
<pre><code class="language-markup">
<xmp><button type="button" class="btn" onclick="M.toast({toastId: 'my-toast-1'})">Toast 2!</button>
<div id="my-toast-1" style="display: none;">
This is toast nº1 with a <a href="https://github.com/materializecss">link</a>
</div></xmp></code></pre>
</div>

<div id="callback" class="scrollspy section">
<h3 class="header">Callback</h3>
<p>
Expand Down

0 comments on commit a5dfd08

Please sign in to comment.