Skip to content

Commit

Permalink
fix(AlertDialog): Avoid using block on buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisGV04 committed Mar 24, 2024
1 parent ddd6999 commit 576e89a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/runtime/components/overlays/AlertDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,17 @@ async function handleConfirm() {
<div :class="ui.actions.container">
<UiButton
v-if="props.confirmBtn"
block
:loading="loading"
:class="ui.actions.btnSize"
:class="ui.actions.buttons"
:label="props.confirmBtn.label"
:variant="props.confirmBtn.variant"
@click="handleConfirm"
/>

<AlertDialog.Cancel v-if="props.cancelBtn" as-child>
<UiButton
block
:disabled="loading"
:class="ui.actions.btnSize"
:class="ui.actions.buttons"
:label="props.cancelBtn.label"
:variant="props.cancelBtn.variant"
@click="$open = false"
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/ui.config/alert-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export default /*ui*/ {
title: 'text-center text-lg font-medium text-gray-900 sm:text-left sm:text-xl',
description: 'mt-1 text-center text-gray-600 sm:text-left',
actions: {
container: 'mt-4 flex flex-col gap-2 sm:flex-row',
btnSize: 'sm:w-max',
container: 'mt-4 flex flex-col gap-2 sm:flex-row sm:justify-start',
buttons: '',
},
variant: {
danger: {
Expand Down

0 comments on commit 576e89a

Please sign in to comment.