seitime-frappe/frappe/templates/components/dropdown.html
2020-04-21 16:49:58 +05:30

25 lines
1,000 B
HTML

<details class="relative inline-block text-left dropdown hide-summary-arrow">
<summary class="block cursor-pointer focus:outline-none">
<span class="inline-flex items-center justify-center text-gray-800 hover:text-gray-900">
{{ label }}
<svg class="w-5 h-5 ml-2 -mr-1" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd"
d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
clip-rule="evenodd" />
</svg>
</span>
</summary>
<div
class="absolute right-0 w-56 mt-2 origin-top-right rounded-md shadow-lg">
<div class="bg-white rounded-md shadow-xs">
<div class="py-1">
{%- for item in items -%}
<a href="{{ item.link or item.url }}"
class="block px-4 py-2 text-sm leading-5 text-gray-800 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900">
{{ item.label }}
</a>
{%- endfor -%}
</div>
</div>
</div>
</details>