-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start input list with add and delete actions
- Loading branch information
Showing
8 changed files
with
583 additions
and
23 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<script setup> | ||
/** | ||
@name Forms/Error/Dropdown.vue | ||
@description This component is used to display a feedback message on a dropdown field. | ||
It is used with /Forms/Field components. | ||
@example | ||
{ | ||
isValid: false, | ||
isValue: false, | ||
} | ||
@param {boolean} [isValid=false] - Check if the field is valid | ||
@param {boolean} [isValue=false] - Check if the field has a value, display a different message if the field is empty or not | ||
@param {boolean} [isValueTaken=false] - Check if input is already taken. Use with list input. | ||
@param {string} [errorClass=""] - Additional class | ||
*/ | ||
const props = defineProps({ | ||
isValid: { | ||
type: Boolean, | ||
required: false, | ||
}, | ||
isValue: { | ||
type: Boolean, | ||
required: false, | ||
}, | ||
isValueTaken: { | ||
type: Boolean, | ||
required: false, | ||
default: false, | ||
}, | ||
errorClass: { | ||
type: String, | ||
required: false, | ||
default: "", | ||
}, | ||
}); | ||
</script> | ||
|
||
<template> | ||
<div | ||
:aria-hidden="props.isValid ? 'true' : 'false'" | ||
:class="[ | ||
props.isValid ? 'hidden' : '', | ||
'select-dropdown-btn last first', | ||
props.errorClass, | ||
]" | ||
role="alert" | ||
> | ||
<p class="input-error-dropdown-msg"> | ||
{{ | ||
props.isValid | ||
? $t("inp_input_valid") | ||
: props.isNoMatch | ||
? $t("inp_input_no_match") | ||
: props.isValueTaken | ||
? $t("inp_input_error_taken") | ||
: !props.isValue | ||
? $t("inp_input_error_required") | ||
: $t("inp_input_error") | ||
}} | ||
</p> | ||
</div> | ||
</template> |
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
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
Oops, something went wrong.