Skip to content

Commit dbb4c1c

Browse files
committed
Create IconGrid component
1 parent 6ebc2a0 commit dbb4c1c

2 files changed

Lines changed: 23 additions & 3 deletions

File tree

src/App.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<template>
22
<div>
3-
<icon-container v-for="icon in icons" :name="icon"></icon-container>
3+
<icon-grid :icons="icons"></icon-grid>
44
</div>
55
</template>
66

77
<script>
88
import {mapState} from 'vuex';
9-
import IconContainer from './IconContainer';
9+
import IconGrid from './IconGrid';
1010
1111
export default {
1212
name: 'App',
13-
components: {IconContainer},
13+
components: {IconGrid},
1414
computed: mapState(['icons'])
1515
}
1616
</script>

src/IconGrid.vue

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<template>
2+
<div>
3+
<icon-container v-for="icon in icons" :name="icon"></icon-container>
4+
</div>
5+
</template>
6+
7+
<script>
8+
import IconContainer from './IconContainer';
9+
10+
export default {
11+
name: 'IconGrid',
12+
components: {IconContainer},
13+
props: {
14+
icons: {
15+
type: Array,
16+
required: true
17+
}
18+
}
19+
}
20+
</script>

0 commit comments

Comments
 (0)