Skip to content

Commit 77ca540

Browse files
authored
feat(vfg): field-array-card-container refactor [khcp-11346] (#1323)
Convert to setup syntax and use design tokens. Address [KHCP-11346](https://konghq.atlassian.net/browse/KHCP-11346).
1 parent ced9aa7 commit 77ca540

File tree

1 file changed

+16
-23
lines changed

1 file changed

+16
-23
lines changed

packages/core/forms/src/generator/fields/advanced/FieldArrayCardContainer.vue

+16-23
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,28 @@
1414
</div>
1515
</template>
1616

17-
<script>
17+
<script lang="ts" setup>
1818
import { TrashIcon } from '@kong/icons'
19-
export default {
20-
name: 'FieldArrayCardContainer',
21-
22-
components: { TrashIcon },
23-
24-
props: {
25-
model: {
26-
type: Object,
27-
default: null,
28-
},
29-
schema: {
30-
type: Object,
31-
default: null,
32-
},
19+
20+
defineProps({
21+
model: {
22+
type: Object,
23+
default: () => null,
24+
},
25+
schema: {
26+
type: Object,
27+
default: () => null,
3328
},
29+
})
3430
35-
emits: ['remove-item'],
36-
}
31+
defineEmits<{
32+
(e: 'remove-item'): void,
33+
}>()
3734
</script>
3835

3936
<style lang='scss'>
4037
.array-card-container-wrapper {
4138
width: 100%;
42-
43-
.kong-card {
44-
width: 50%;
45-
}
4639
}
4740
</style>
4841

@@ -52,11 +45,11 @@ export default {
5245
display: flex;
5346
5447
.card {
55-
margin-bottom: 8px;
48+
margin-bottom: $kui-space-40;
5649
}
5750
5851
.array-card-remove-button {
59-
margin-left: 12px;
52+
margin-left: $kui-space-50;
6053
}
6154
}
6255
</style>

0 commit comments

Comments
 (0)