mirror of
https://github.com/eugene-serb/wavelovers.git
synced 2023-09-09 23:41:16 +03:00
![Eugene Serb](/assets/img/avatar_default.png)
- added condition for link tags. - improve stability. - linted code. - up version. - build.
57 lines
1.1 KiB
Vue
57 lines
1.1 KiB
Vue
<template>
|
|
<div class="content-item pattern-list">
|
|
<PatternItem v-for="(pattern, index) in patterns"
|
|
:key="pattern.name"
|
|
:pattern="pattern"
|
|
:index="index"
|
|
:mode="mode"
|
|
:isActive="isActive"
|
|
@change="change" />
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { defineComponent } from 'vue';
|
|
import PatternItem from '@/components/PatternItem.vue';
|
|
|
|
export default defineComponent({
|
|
name: 'PatternList',
|
|
props: {
|
|
patterns: {
|
|
type: Array,
|
|
},
|
|
mode: {
|
|
type: Number,
|
|
},
|
|
isActive: {
|
|
type: Boolean,
|
|
},
|
|
},
|
|
components: {
|
|
PatternItem: PatternItem,
|
|
},
|
|
methods: {
|
|
change: function (index: number): void {
|
|
this.$emit('change', index as number);
|
|
},
|
|
},
|
|
});
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.pattern-list {
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-around;
|
|
flex-wrap: wrap;
|
|
gap: 16px;
|
|
}
|
|
|
|
@media only screen and (min-width: 540px) {
|
|
.pattern-list {
|
|
display: flex;
|
|
gap: 32px;
|
|
}
|
|
}
|
|
</style>
|