Make tooltip module and update example

This commit is contained in:
luis cielak 2018-08-09 14:06:29 -04:00
parent fcbb16afc6
commit 30a84c3ac6
2 changed files with 13 additions and 2 deletions

View File

@ -0,0 +1,9 @@
{% from "components/icon.html" import Icon %}
{% macro Tooltip(message) -%}
<span v-tooltip="{content: '{{message}}'}">
{{ Icon('help') }}
</span>
{%- endmacro %}

View File

@ -3,6 +3,7 @@
{% from "components/icon.html" import Icon %}
{% from "components/modal.html" import Modal %}
{% from "components/alert.html" import Alert %}
{% from "components/tooltip.html" import Tooltip %}
{% block content %}
@ -283,13 +284,14 @@
</form>
<hr>
<h5>Tooltips</h5>
<span v-tooltip="'this is a tooltip text'">{{ Icon('help') }}</span><code>top</code> <br>
{{ Tooltip('this is a tooltip text') }}<code>example</code> <br>
<span v-tooltip.top-start="'this is a tooltip text'">{{ Icon('help') }}</span><code>top-start</code> <br>
<span v-tooltip.right="'this is a tooltip text'">{{ Icon('help') }}</span><code>right</code> <br>
<span v-tooltip.bottom="'this is a tooltip text'">{{ Icon('help') }}</span><code>bottom</code> <br>
</div>
</div>