Skip to content

Commit

Permalink
feat(component): add column
Browse files Browse the repository at this point in the history
  • Loading branch information
damienrobinson committed Jan 5, 2020
1 parent 8eb27b0 commit 39a2648
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
16 changes: 16 additions & 0 deletions components/column.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<template>
<b-col v-editable="blok">
<component
:is="child.component"
v-for="child in blok.children"
:key="child._uid"
:blok="child"
></component>
</b-col>
</template>

<script>
export default {
props: { blok: { type: Object, required: true } },
};
</script>
2 changes: 2 additions & 0 deletions plugins/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import Grid from '@/components/grid.vue';
import Feature from '@/components/feature.vue';
import Hero from '@/components/hero.vue';
import CardGroup from '@/components/card-group';
import Column from '@/components/column';

Vue.component('page', Page);
Vue.component('teaser', Teaser);
Vue.component('grid', Grid);
Vue.component('feature', Feature);
Vue.component('hero', Hero);
Vue.component('card-group', CardGroup);
Vue.component('column', Column);
30 changes: 30 additions & 0 deletions storyblok/column.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
name: 'column',
display_name: null,
schema: {
children: {
type: 'bloks',
},
sm: {
type: 'number',
},
md: {
type: 'number',
},
lg: {
type: 'number',
},
xl: {
type: 'number',
},
},
image: null,
preview_field: null,
is_root: false,
preview_tmpl: null,
is_nestable: true,
all_presets: [],
preset_id: null,
real_name: 'column',
component_group_uuid: null,
};

0 comments on commit 39a2648

Please sign in to comment.