File tree Expand file tree Collapse file tree 2 files changed +9
-13
lines changed
Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Original file line number Diff line number Diff line change 1717</template >
1818
1919<script setup lang="ts">
20- import type { IconPathTypes } from ' @/types/icon'
21- import { defineProps , ref , type PropType } from ' vue'
20+ import type { IconProps } from ' @/types/icon'
21+ import { defineProps , ref } from ' vue'
2222const isHovered = ref (false )
23- const { name, className, onClick } = defineProps ({
24- name: Object as PropType <IconPathTypes >,
25- className: {
26- type: String ,
27- required: false
28- },
29- onClick: {
30- type: Function as PropType <(event : MouseEvent ) => void >,
31- required: false
32- }
33- })
23+ const { name, className, onClick } = defineProps <IconProps >()
3424 </script >
Original file line number Diff line number Diff line change @@ -15,3 +15,9 @@ interface IconOptions {
1515 fillRule ?: 'evenodd' | 'inherit' | 'nonzero'
1616 clipRule ?: 'evenodd' | 'inherit' | 'nonzero'
1717}
18+
19+ export interface IconProps {
20+ name : IconPathTypes
21+ className ?: string
22+ onClick ?: ( ) => void
23+ }
You can’t perform that action at this time.
0 commit comments