Skip to content

Commit 991c6cd

Browse files
committed
Remove redundant validator from Icon.vue
1 parent 8beacea commit 991c6cd

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

src/components/Icon/Icon.vue

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,10 @@
77
</template>
88

99
<script lang="ts" setup>
10-
import { type PropType } from 'vue';
1110
import InlineSvg from 'vue-inline-svg';
1211
import type { Components } from '@/types';
1312
14-
defineProps({
15-
icon: {
16-
type: Object as PropType<Components.Icon.Icon>,
17-
required: true,
18-
validator: (icon: Components.Icon.Icon): boolean => {
19-
// Only allow undefined prop or icon that includes ".svg" in the path
20-
return icon.src.includes('.svg');
21-
}
22-
}
23-
});
13+
defineProps<{
14+
icon: Components.Icon.Icon;
15+
}>();
2416
</script>

0 commit comments

Comments
 (0)