From a250d96b18edc7cd743df43b0ebdbc1ef20d9930 Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Mon, 16 Jan 2017 16:29:51 -0500 Subject: Wire up floating action button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new next action dialogue comes up immediately, hiding the animation. That’ll need to change. --- main.ur | 3 ++- material/material.ur | 5 +++-- material/material.urs | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/main.ur b/main.ur index 1f540f8..42c3dab 100644 --- a/main.ur +++ b/main.ur @@ -47,7 +47,8 @@ datatype mode = NextActions | NewNextAction val main = actionItems <- bind renderNextActions source; mode <- source NextActions; - floatingActionButton <- Material.FloatingActionButton.make "add"; + floatingActionButton <- + Material.FloatingActionButton.make "add" (fn _ => set mode NewNextAction); return (Material.page { Head = (* TODO(bbaren): Write a meta-description tag. *) diff --git a/material/material.ur b/material/material.ur index f63bec0..5a2f72d 100644 --- a/material/material.ur +++ b/material/material.ur @@ -130,14 +130,15 @@ structure FloatingActionButton = struct val width = 56 val height = 56 - fun make s = + fun make s clickHandler = inkCenter <- source None; return