Skip to content

Commit 5b92d7c

Browse files
authored
Merge pull request #631 from dnum-mi/fix/corrige-les-types-pour-les-icones
fix(DsfrButton|DsfrTableHeader): 🏷️ corrige les types pour les icones
2 parents 9849bcc + ea994bb commit 5b92d7c

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/components/DsfrButton/DsfrButton.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script lang="ts" setup>
22
import { type Ref, computed, ref } from 'vue'
33
import { OhVueIcon as VIcon } from 'oh-vue-icons'
4-
import { type CustomizeIconType } from 'oh-vue-icons'
54
65
// import '@gouvfr/dsfr/dist/component/button/button.module.js'
76
@@ -14,7 +13,7 @@ export type DsfrButtonProps = {
1413
iconOnly?: boolean
1514
noOutline?: boolean
1615
size?: 'sm' | 'small' | 'lg' | 'large' | 'md' | 'medium' | '' | undefined
17-
icon?: string | CustomizeIconType
16+
icon?: string | InstanceType<typeof VIcon>['$props']
1817
onClick?: ($event: MouseEvent) => void
1918
}
2019

src/components/DsfrTable/DsfrTableHeader.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<script lang="ts" setup>
22
import { type ThHTMLAttributes } from 'vue'
3-
import { type CustomizeIconType, OhVueIcon as VIcon } from 'oh-vue-icons'
3+
import { OhVueIcon as VIcon } from 'oh-vue-icons'
44
55
export type DsfrTableHeaderProps = {
66
header?: string
77
headerAttrs?: ThHTMLAttributes & { onClick?: (e: MouseEvent) => void }
8-
icon?: CustomizeIconType
8+
icon?: InstanceType<typeof VIcon>['$props']
99
}
1010
1111
withDefaults(defineProps<DsfrTableHeaderProps>(), {

0 commit comments

Comments
 (0)