formitems: add DisplayTextItem for simple text & fix ButtonItem style

This commit is contained in:
axolotle 2022-10-03 17:41:02 +02:00
parent 1bacb6c1df
commit 8b6db431d6
4 changed files with 24 additions and 2 deletions

View file

@ -4,6 +4,7 @@
:variant="type"
@click="$emit('action', $event)"
:disabled="!enabled"
class="d-block mb-3"
>
<icon :iname="icon_" class="mr-2" />
<span v-html="label" />

View file

@ -0,0 +1,16 @@
<template>
<div>
<p v-text="label" />
</div>
</template>
<script>
export default {
name: 'DisplayTextItem',
props: {
id: { type: String, default: null },
label: { type: String, default: null }
}
}
</script>

View file

@ -12,4 +12,3 @@ export default {
}
}
</script>

View file

@ -225,11 +225,17 @@ export function formatYunoHostArgument (arg) {
renderSelf: true
},
{
types: ['markdown', 'display_text'],
types: ['markdown'],
name: 'MarkdownItem',
props: ['label:ask'],
renderSelf: true
},
{
types: ['display_text'],
name: 'DisplayTextItem',
props: ['label:ask'],
renderSelf: true
},
{
types: ['button'],
name: 'ButtonItem',