You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.3 KiB

<p>If you component or page contains <view:CodeInline>overlay.OverlayContainerRef</view:CodeInline> and is wired correctly, you can create modals very easily.</p>
<p>A simple requester modal is already contained in the overlay package. Use it with:</p>
<pre vg-content='"func (c *PageOverlays) handleButton(event vugu.DOMEvent) {" +
" c.SetModal(&overlay.ModalRequester{\n" +
" SymbolSlot: &icons.LInfoCircle{AttrMap: vugu.AttrMap{\"style\": \"font-size: 2em;\"}},\n" +
" Title: \"Simple requester\",\n" +
" Message: \"This is a simple modal requester, are you happy with it?\\nIt also supports multi line text!\",\n" +
" ClickAbort: input.ClickFunc(func(event input.ClickEvent) {}),\n" +
" ClickYes: input.ClickFunc(func(event input.ClickEvent) {}),\n" +
" })\n" +
"}"' style="margin: 0;"></pre>
<input:Button @Click="c.handleButton(event)">Open simple modal</input:Button>
<script type="application/x-go">
import (