Skip to content

Commit

Permalink
UiAlert enhancement: Change 'dismissible' to 'persist' (JosephusPaye#468
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Amal Mathew committed Jun 19, 2023
1 parent 3348200 commit 23cc6b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions docs-src/pages/UiAlert.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
Animations for this alert are disabled.
</ui-alert>

<ui-alert :dismissible="false">This alert is not dismissible.</ui-alert>
<ui-alert :persist="true">This alert is not dismissible.</ui-alert>

<ui-alert :dismissible="false" remove-icon>
This alert has no icon is not dismissible.
<ui-alert :persist="true" remove-icon>
This alert has no icon and is not dismissible.
</ui-alert>

<ui-button @click="resetAlerts">Reset Alerts</ui-button>
Expand Down Expand Up @@ -105,13 +105,13 @@
</tr>

<tr>
<td>dismissible</td>
<td>persist</td>
<td>Boolean</td>
<td><code>true</code></td>
<td><code>false</code></td>
<td>
<p>Whether or not the alert shows a dismiss button.</p>
<p>You should listen for the <code>dismiss</code> event and hide the alert.</p>
<p>Set to <code>false</code> to remove the dismiss button.</p>
<p>Set to <code>true</code> to remove the dismiss button.</p>
</td>
</tr>
</tbody>
Expand Down
6 changes: 3 additions & 3 deletions src/UiAlert.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</div>

<div class="ui-alert__dismiss-button">
<ui-close-button v-if="dismissible" size="small" @click="dismissAlert"></ui-close-button>
<ui-close-button v-if="!persist" size="small" @click="dismissAlert"></ui-close-button>
</div>
</div>
</div>
Expand Down Expand Up @@ -75,9 +75,9 @@ export default {
type: Boolean,
default: false,
},
dismissible: {
persist: {
type: Boolean,
default: true,
default: false,
},
},
Expand Down

0 comments on commit 23cc6b5

Please sign in to comment.