Skip to content

Commit

Permalink
Merge pull request #32 from pdmfc/feature/svg-detail-field
Browse files Browse the repository at this point in the history
add svg to detail field also
  • Loading branch information
msouto346 committed Oct 9, 2021
2 parents e4b0c41 + 3c33667 commit f938ea0
Show file tree
Hide file tree
Showing 3 changed files with 27,480 additions and 4 deletions.
27,474 changes: 27,473 additions & 1 deletion dist/js/field.js

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions resources/js/components/DetailField.vue
Expand Up @@ -2,12 +2,13 @@
<panel-item :field="field">
<template v-slot:value>
<button
class="btn btn-default btn-primary"
class="btn btn-default btn-primary flex items-center justify-center"
@click="confirmActionModalOpened = true"
:disabled="field.readonly"
:style="`background-color: ${field.buttonColor} !important`"
>
{{ buttonText }}
<span>{{ buttonText }}</span>
<component v-if="svg" :is="svg"></component>
</button>

<!-- Action Confirmation Modal -->
Expand Down Expand Up @@ -182,6 +183,10 @@ export default {
buttonText() {
return this.field.text || this.__('Run');
},
svg() {
return this.field.svg || false;
}
}
}
Expand Down
1 change: 0 additions & 1 deletion resources/js/components/IndexField.vue
Expand Up @@ -6,7 +6,6 @@
@click="openConfirmationModal"
:disabled="disabled"
:style="`background-color: ${field.buttonColor} !important`"

>
<loading v-if="showLoading" :color="field.loadingColor" />
<span v-else>{{ buttonText }}</span>
Expand Down

0 comments on commit f938ea0

Please sign in to comment.