Skip to content

Commit

Permalink
Merge pull request #149 from IBEC-BOX/feat/gallery
Browse files Browse the repository at this point in the history
added documentation for gallery row, view
  • Loading branch information
Zh3nyaZh3nya authored Dec 19, 2024
2 parents 96340be + 2f1d2b1 commit 57eaf7b
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/runtime/components/Parts/Gallery/Row.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:slides-per-view="blocks.length === 4 ? (lgAndUp ? 4 : (mdAndUp ? 3.2 : 1.2)) : (lgAndUp ? 4.2 : (mdAndUp ? 3.2 : 1.2))"
:space-between="lgAndUp ? 20 : 8"
direction="horizontal"
class="row-gallery-blocks d-block"
class="row-gallery-blocks d-block w-100"
height="290px"
v-bind="swiperAttrs"
>
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/components/Parts/Gallery/View.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<swiper-container
ref="thumbsSwiperRef"
:direction="mdAndUp ? 'vertical' : 'horizontal'"
class="gallery-view-swiper-blocks d-block"
class="gallery-view-swiper-blocks w-100 d-block"
:style="{ height: mdAndUp ? '100vh' : '100%', overflow: 'auto' }"
:slides-per-view="mdAndUp ? 6.8 : 4.2"
space-between="0"
Expand Down
101 changes: 101 additions & 0 deletions src/stories/partsGalleryRow.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
import Row from '../runtime/components/Parts/Gallery/Row.vue';

export default {
title: 'Parts/Gallery/Row',
component: Row,
tags: ['autodocs'],
argTypes: {},
};

export const StandardWithLinks = {
render: (args) => ({
components: { Row },
setup() {
return { args };
},
template: '<Row v-bind="args" />',
}),
args: {
blocks: [
{
id: 1,
title: 'Продукция',
preview: 'https://cdn.vuetifyjs.com/images/cards/sunshine.jpg',
category: {
id: 1,
title: 'Производство'
}
},
{
id: 2,
title: 'Корпоративные бизнес-системы',
preview: 'https://cdn.vuetifyjs.com/images/cards/sunshine.jpg',
category: {
id: 1,
title: 'Производство'
}
},
{
id: 2,
title: 'Корпоративные бизнес-системы',
preview: 'https://cdn.vuetifyjs.com/images/cards/sunshine.jpg',
category: {
id: 1,
title: 'Производство'
}
},
{
id: 2,
title: 'Корпоративные бизнес-системы',
preview: 'https://cdn.vuetifyjs.com/images/cards/sunshine.jpg',
category: {
id: 1,
title: 'Производство'
}
},
{
id: 2,
title: 'Корпоративные бизнес-системы',
preview: 'https://cdn.vuetifyjs.com/images/cards/sunshine.jpg',
category: {
id: 1,
title: 'Производство'
}
},
],
disableLinks: false,
}
}

export const StandardWithoutLinks = {
render: (args) => ({
components: { Row },
setup() {
return { args };
},
template: '<Row v-bind="args" />',
}),
args: {
blocks: [
{
id: 1,
title: 'Продукция',
preview: 'https://cdn.vuetifyjs.com/images/cards/sunshine.jpg',
category: {
id: 1,
title: 'Производство'
}
},
{
id: 2,
title: 'Корпоративные бизнес-системы',
preview: 'https://cdn.vuetifyjs.com/images/cards/sunshine.jpg',
category: {
id: 1,
title: 'Производство'
}
},
],
disableLinks: true,
}
}
39 changes: 39 additions & 0 deletions src/stories/partsGalleryView.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import View from '../runtime/components/Parts/Gallery/View.vue';

export default {
title: 'Parts/Gallery/View',
component: View,
tags: ['autodocs'],
argTypes: {},
};

export const Standard = {
render: (args) => ({
components: { View },
setup() {
return { args };
},
template: '<View v-bind="args" />',
}),
args: {
gallery: [
{
id: 1,
image: 'https://cdn.vuetifyjs.com/images/cards/sunshine.jpg',
active: true,
},
{
id: 2,
image: 'https://cdn.vuetifyjs.com/images/cards/sunshine.jpg',
active: false,
},
],
previewImage: {
image: 'https://cdn.vuetifyjs.com/images/cards/sunshine.jpg',
active: true,
id: 1,
},
modelValue: true,
}
};

2 changes: 1 addition & 1 deletion src/stories/partsNews.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import partsNews from '../runtime/components/Parts/News.vue'

// More on how to set up stories at: https://storybook.js.org/docs/vue/writing-stories/introduction
export default {
title: 'Parts/partsNews',
title: 'Parts/News',
component: partsNews,
tags: ['autodocs'],
argTypes: {
Expand Down

0 comments on commit 57eaf7b

Please sign in to comment.