Create IconGrid component

This commit is contained in:
Cole Bemis 2017-01-28 22:29:48 -08:00
parent 6ebc2a095b
commit dbb4c1c80c
2 changed files with 23 additions and 3 deletions

View File

@ -1,16 +1,16 @@
<template>
<div>
<icon-container v-for="icon in icons" :name="icon"></icon-container>
<icon-grid :icons="icons"></icon-grid>
</div>
</template>
<script>
import {mapState} from 'vuex';
import IconContainer from './IconContainer';
import IconGrid from './IconGrid';
export default {
name: 'App',
components: {IconContainer},
components: {IconGrid},
computed: mapState(['icons'])
}
</script>

20
src/IconGrid.vue Normal file
View File

@ -0,0 +1,20 @@
<template>
<div>
<icon-container v-for="icon in icons" :name="icon"></icon-container>
</div>
</template>
<script>
import IconContainer from './IconContainer';
export default {
name: 'IconGrid',
components: {IconContainer},
props: {
icons: {
type: Array,
required: true
}
}
}
</script>