Skip to content

Commit

Permalink
components(calculator/result-list): migrate to Composition API with r…
Browse files Browse the repository at this point in the history
…efactor
  • Loading branch information
ozgurg committed Apr 2, 2024
1 parent 81ffbb2 commit 804b938
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 21 deletions.
4 changes: 4 additions & 0 deletions assets/scss/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
gap: .5rem !important
}

.gap-10 {
gap: 1.25rem !important
}

.gap-12 {
gap: 1.5rem !important
}
Expand Down
35 changes: 14 additions & 21 deletions components/calculator/result-list.vue
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
<template>
<div class="vh-result-list d-flex flex-column">
<calculator-result-form-row
v-for="_item in items"
:key="_item.key"
:value="_item.value"
:label="_item.key"
:is-highlighted="_item.isHighlighted ?? false" />
<div class="d-flex flex-column gap-10">
<template v-for="_item in props.items">
<calculator-result-form-row
:key="_item.key"
:value="_item.value"
:label="_item.key"
:is-highlighted="_item.isHighlighted ?? false" />
</template>
</div>
</template>
<script>
export default {
props: {
items: {
type: Array,
required: true
}
<script setup="">
const props = defineProps({
items: {
type: Array,
required: true
}
};
});
</script>
<style scoped="">
.vh-result-list {
gap: 1.125rem
}
</style>

0 comments on commit 804b938

Please sign in to comment.