Skip to content

Commit

Permalink
Merge pull request #352 from weni-ai/fix/integrate-button-width
Browse files Browse the repository at this point in the history
[FLOWS-281] - Fix: Integrate button width on app details page
  • Loading branch information
paulobernardoaf authored Dec 1, 2023
2 parents c60f020 + b67448b commit aba107e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
12 changes: 10 additions & 2 deletions src/components/IntegrateButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
<LoadingButton
ref="button"
type="secondary"
loadingPosition="center"
:loadingPosition="loadingPosition"
:size="size"
:iconCenter="icon"
:iconCenter="loadingPosition == 'center' ? icon : null"
:iconLeft="loadingPosition == 'left' ? icon : null"
:isLoading="loadingCreateApp"
:disabled="disabled"
:text="text"
Expand Down Expand Up @@ -49,6 +50,13 @@
type: String,
default: 'small',
},
loadingPosition: {
type: String,
default: 'center',
validator(value) {
return ['left', 'center'].indexOf(value) !== -1;
},
},
},
data() {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/components/LoadingButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
props: {
type: {
type: String,
default: 'terciary',
default: 'tertiary',
},
size: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions src/components/app/AppDetailsHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
:app="app"
:disabled="!app.can_add"
:text="$t('apps.details.header.add')"
loadingPosition="left"
/>

<add-modal ref="addModal" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports[`AppDetailsHeader.vue should be rendered properly 1`] = `
<div class="app-details-header__content__description">some specific text</div>
</div>
<div type="add" class="app-details-header__button">
<unnnicbutton-stub size="large" text="some specific text" type="secondary" iconcenter="add-1" disabled="true" class="loading-button"></unnnicbutton-stub>
<unnnicbutton-stub size="large" text="some specific text" type="secondary" iconleft="add-1" disabled="true" class="loading-button"></unnnicbutton-stub>
<!---->
<!---->
</div>
Expand Down

0 comments on commit aba107e

Please sign in to comment.