-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(vue-challenges): props validation
- Loading branch information
1 parent
dc4a1d8
commit feadcf3
Showing
4 changed files
with
17 additions
and
9 deletions.
There are no files selected for viewing
9 changes: 0 additions & 9 deletions
9
packages/vue-challenges/questions/323-prop-validation/Button.vue
This file was deleted.
Oops, something went wrong.
File renamed without changes.
17 changes: 17 additions & 0 deletions
17
packages/vue-challenges/solutions/323-prop-validation/Button.vue
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,17 @@ | ||
<script setup> | ||
defineProps({ | ||
type: { | ||
type: String, | ||
default: 'default', | ||
validator(value) { | ||
return ['primary', 'ghost', 'dashed', 'link', 'text', 'default'].includes( | ||
value | ||
); | ||
}, | ||
}, | ||
}); | ||
</script> | ||
|
||
<template> | ||
<button>Button</button> | ||
</template> |
File renamed without changes.