validate that name prop is included in the list of svg icons

This commit is contained in:
Alina Beck 2019-11-14 14:11:33 +03:00
parent 848e7d76da
commit 9a7222fad7

View File

@ -5,13 +5,16 @@
</template>
<script>
import icons from '~/view/assets/icons'
import icons, { iconNames } from '~/assets/_new/icons'
export default {
props: {
name: {
type: String,
required: true,
validator(value) {
return iconNames.indexOf(value) !== -1
},
},
},
computed: {