summaryrefslogtreecommitdiff
path: root/mdl/mdl.ur
diff options
context:
space:
mode:
Diffstat (limited to 'mdl/mdl.ur')
-rw-r--r--mdl/mdl.ur16
1 files changed, 16 insertions, 0 deletions
diff --git a/mdl/mdl.ur b/mdl/mdl.ur
index f3dec74..7900822 100644
--- a/mdl/mdl.ur
+++ b/mdl/mdl.ur
@@ -13,3 +13,19 @@ CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License. *)
structure Classes = MdlClasses
+open Classes
+
+structure Toast = struct
+ val make : transaction {Placeholder: xbody,
+ Show: string -> transaction unit} =
+ id <- fresh;
+ return {
+ Placeholder = <xml>
+ <div id={id} class="mdl-js-snackbar mdl-snackbar">
+ <div class="mdl-snackbar__text" />
+ <button class="mdl-snackbar__action"></button>
+ </div>
+ </xml>,
+ Show = MdlFfi.showSnackbar (show id)
+ }
+end