File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 2020 :color =" iconLeftColor"
2121 :class =" {'h-button__icon h-button__icon--position-left': slotPassed}"
2222 />
23+
2324 <HIcon
2425 v-if =" isLoading"
2526 icon =" fas fa-circle-notch fa-spin"
2627 class =" h-button__icon h-button__icon--is-loading"
2728 />
29+
2830 <span
29- v-if =" slotPassed"
31+ v-if =" slotPassed && !onlyIcon "
3032 :class =" { 'h-button__text': true }"
3133 >
3234 <slot />
3335 </span >
36+
3437 <HIcon
3538 v-if =" iconRight"
3639 :icon =" iconRight"
@@ -77,6 +80,11 @@ export default {
7780 variant: {
7881 type: String ,
7982 default: ' contained' ,
83+ validator: shouldBeOneOf ([
84+ ' contained' ,
85+ ' outlined' ,
86+ ' text' ,
87+ ]),
8088 },
8189 size: {
8290 type: String ,
Original file line number Diff line number Diff line change 1111 >
1212 {{ label }}
1313 </HText >
14+
1415 <slot />
16+
1517 <HText
1618 v-if =" helperTextActive"
1719 :color =" finalHasError ? 'danger' : 'grey'"
@@ -55,8 +57,8 @@ export default {
5557 },
5658 },
5759 setup (props ) {
58- const $state = reactive ({ _hasError : false });
59- const finalHasError = computed (() => props .hasError || $state ._hasError );
60+ const $state = reactive ({ hasError : false });
61+ const finalHasError = computed (() => props .hasError || $state .hasError );
6062 provide (' hasErrorFromValidate' , finalHasError .value );
6163
6264 return { finalHasError };
You can’t perform that action at this time.
0 commit comments