Created
January 27, 2019 09:34
-
-
Save dobromir-hristov/898c9a0ffa59fbb8a86a2ea3c6d621a0 to your computer and use it in GitHub Desktop.
Template for the self promise awaiting button
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button | |
v-on="listeners" | |
:class="computedClasses" | |
:disabled="loadingState" | |
class="button is-primary" | |
> | |
<slot name="loading" v-if="loadingState">Loading...</slot> | |
<slot name="success" v-else-if="isSuccess">Sucess!</slot> | |
<slot name="error" v-else-if="hasError">Errored</slot> | |
<slot v-else /> | |
</button> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment