Skip to content

Cancel and confirm buttons - AvCancelConfirmButtons

✨ Introduction

The AvCancelConfirmButtons is an interaction element with an interface enabling the user to perform a cancel and/or a confirm action.

🏗️ Structure

This component consist of two optional buttons :

  • A cancel button, displayed by passing the cancelLabel prop,
  • A confirm button, displayed by passing the confirmLabel prop,

🏷️ Props

NameTypeDefaultMandatoryDescription
cancelLabelstringundefinedLabel and title (for accessibility) of the cancel button.
cancelIconstring'mdi:close-circle-outline'Icon name of the cancel button.
cancelDisabledbooleanundefinedAdds a disabled state on the cancel button.
cancelIsLoadingbooleanundefinedAdds a loading state on the cancel button.
confiirmLabelstringundefinedLabel and title (for accessibility) of the confirm button.
confirmIconstring'mdi:check-circle-outline'Icon name of the confirm button.
confirmDisabledbooleanundefinedAdds a disabled state on the cancel button.
confirmIsLoadingbooleanundefinedAdds a loading state on the cancel button.
isLoadingbooleanfalseIndicates a loading status for the buttons.

🔊 Events

NameData (payload)Description
'cancel'Event emitted when the cancel button is clicked.
'confirm'Event emitted when the confirm button is clicked.

🎨 Slots

None.

🚀 Storybook demos

You can find examples of use and demo of the component on its dedicated Storybook page.

💡 Examples of use

vue
<template>
  <AvCancelConfirmButton
    cancel-label="Close"
    @cancel="closeModal"
  />
</template>
vue
<template>
  <AvCancelConfirmButton
    confirm-label="Confirm"
    @confirm="saveData"
  />
</template>
vue
<template>
  <AvCancelConfirmButton
    cancel-label="Previous step"
    confirm-label="Next step"
    @cancel="goToPrevStep"
    @confirm="goToNextStep"
  />
</template>