refactor(editor): Replace mixed style of defineProps with the new style (no-changelog) (#9787)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-06-18 09:55:10 +02:00
committed by GitHub
parent 1e8716a607
commit 08c6e9b571
27 changed files with 161 additions and 277 deletions

View File

@@ -1,31 +1,22 @@
<script lang="ts" setup>
import { computed } from 'vue';
import type { IUser, UserStackGroups } from 'n8n-design-system/types';
import N8nAvatar from '../N8nAvatar';
import N8nUserInfo from '../N8nUserInfo';
import type { PropType } from 'vue';
import { computed } from 'vue';
const props = defineProps({
users: {
type: Object as PropType<UserStackGroups>,
required: true,
const props = withDefaults(
defineProps<{
users: UserStackGroups;
currentUserEmail?: string;
maxAvatars?: number;
dropdownTrigger?: 'hover' | 'click';
}>(),
{
currentUserEmail: '',
maxAvatars: 2,
dropdownTrigger: 'hover',
},
currentUserEmail: {
type: String,
required: false,
default: '',
},
maxAvatars: {
type: Number,
default: 2,
validator: (value: number) => value > 0,
},
dropdownTrigger: {
type: String,
default: 'hover',
validator: (value: string) => ['hover', 'click'].includes(value),
},
});
);
const nonEmptyGroups = computed(() => {
const users: UserStackGroups = {};