Skip to content

Commit

Permalink
feat(feature): add icon
Browse files Browse the repository at this point in the history
  • Loading branch information
shadow81627 committed Dec 22, 2019
1 parent 1320d9b commit 7d8e764
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions components/feature.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
<template>
<div v-editable="blok" class="column feature">
<font-awesome-icon v-if="blok.icon" :icon="blok.icon | split" title="" />
{{ blok.name }}
</div>
</template>

<script>
export default {
filters: {
split(value, sep = ' ') {
if (!value) return '';
value = value.toString();
return value.split(sep);
},
},
props: { blok: { type: Object, required: true } },
};
</script>
3 changes: 3 additions & 0 deletions storyblok/feature.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ module.exports = {
name: {
type: 'text',
},
icon: {
type: 'text',
},
},
image: null,
preview_field: null,
Expand Down

1 comment on commit 7d8e764

@vercel
Copy link

@vercel vercel bot commented on 7d8e764 Dec 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.