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
Plaintext

<div>
<layout:Container>
<h1>Modals</h1>
<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>
<view:Code>
<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>
</view:Code>
<input:Button @Click="c.handleButton(event)">Open simple modal</input:Button>
</layout:Container>
</div>
<style>
</style>
<script type="application/x-go">
import (
"git.d3nexus.de/Dadido3/D3vugu-components/components/input"
"git.d3nexus.de/Dadido3/D3vugu-components/components/layout"
"git.d3nexus.de/Dadido3/D3vugu-components/components/view"
)
</script>