Skip to content

Instantly share code, notes, and snippets.

@philipboomy
Forked from jakedohm/Vue Prop Validation
Created May 7, 2020 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philipboomy/5fdc62fa86c502d8fc94866d2453c677 to your computer and use it in GitHub Desktop.
Save philipboomy/5fdc62fa86c502d8fc94866d2453c677 to your computer and use it in GitHub Desktop.
<script>
export default {
props: {
color: {
type: String,
default: 'teal',
validator: value => ['teal', 'orange'].includes(value)
}
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment