Brief experiment with UI patterns which would be great if could pass in label value

This commit is contained in:
benjamin melançon 2018-10-29 23:45:47 -04:00
parent b846522aad
commit 158b69051b
2 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,19 @@
detail:
label: Detail
description: Show a single detail field.
variants:
default:
label: Default
fields:
label:
type: text
label: Label
description: The field label.
preview: Project name
value:
type: text
label: Value
description: The field contents, or value.
preview: The Agaric Initiatives
libraries:
- octavia/global

View file

@ -0,0 +1,8 @@
{{ label }}
<p class="pattern-field-detail">
<label{{ title_attributes }}>{{ label }}</label>
{% for item in items %}
<strong>{{ item.content }}</strong>
{% endfor %}
</p>
{{ value }}