Skip to content

Commit

Permalink
fix(AvatarGroup/ButtonGroup/MeterGroup): allow deeply partial ui co…
Browse files Browse the repository at this point in the history
…nfig (#2542)
  • Loading branch information
Snack-X authored Nov 6, 2024
1 parent f38a217 commit bf58086
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/runtime/components/elements/AvatarGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { PropType } from 'vue'
import { twMerge, twJoin } from 'tailwind-merge'
import { useUI } from '../../composables/useUI'
import { mergeConfig, getSlotsChildren } from '../../utils'
import type { AvatarSize, Strategy } from '../../types/index'
import type { AvatarSize, DeepPartial, Strategy } from '../../types/index'
import UAvatar from './Avatar.vue'
// @ts-expect-error
import appConfig from '#build/app.config'
Expand Down Expand Up @@ -32,7 +32,7 @@ export default defineComponent({
default: () => ''
},
ui: {
type: Object as PropType<Partial<typeof avatarGroupConfig> & { strategy?: Strategy }>,
type: Object as PropType<DeepPartial<typeof avatarGroupConfig> & { strategy?: Strategy }>,
default: () => ({})
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/components/elements/ButtonGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { twMerge, twJoin } from 'tailwind-merge'
import { useUI } from '../../composables/useUI'
import { mergeConfig, getSlotsChildren } from '../../utils'
import { useProvideButtonGroup } from '../../composables/useButtonGroup'
import type { ButtonSize, Strategy } from '../../types/index'
import type { ButtonSize, DeepPartial, Strategy } from '../../types/index'
// @ts-expect-error
import appConfig from '#build/app.config'
import { button, buttonGroup } from '#ui/ui.config'
Expand Down Expand Up @@ -35,7 +35,7 @@ export default defineComponent({
default: () => ''
},
ui: {
type: Object as PropType<Partial<typeof buttonGroupConfig> & { strategy?: Strategy }>,
type: Object as PropType<DeepPartial<typeof buttonGroupConfig> & { strategy?: Strategy }>,
default: () => ({})
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/components/elements/MeterGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { twJoin } from 'tailwind-merge'
import UIcon from '../elements/Icon.vue'
import { useUI } from '../../composables/useUI'
import { mergeConfig, getSlotsChildren } from '../../utils'
import type { Strategy, MeterSize } from '../../types/index'
import type { DeepPartial, Strategy, MeterSize } from '../../types/index'
import type Meter from './Meter.vue'
// @ts-expect-error
import appConfig from '#build/app.config'
Expand Down Expand Up @@ -51,7 +51,7 @@ export default defineComponent({
default: () => ''
},
ui: {
type: Object as PropType<Partial<typeof meterGroupConfig> & { strategy?: Strategy }>,
type: Object as PropType<DeepPartial<typeof meterGroupConfig> & { strategy?: Strategy }>,
default: () => ({})
}
},
Expand Down

0 comments on commit bf58086

Please sign in to comment.