Skip to content

Commit b0bfed3

Browse files
authored
Merge pull request #62 from lsdevelop/patch-1
Fix(MagicBento): Adjust nullability and enhance ts typings
2 parents f126758 + eca975f commit b0bfed3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/content/Components/MagicBento/MagicBento.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ const ParticleCard = defineComponent({
378378
const GlobalSpotlight = defineComponent({
379379
name: 'GlobalSpotlight',
380380
props: {
381-
gridRef: { type: Object as PropType<HTMLDivElement | null>, required: true },
381+
gridRef: {type: [Object, null] as PropType<HTMLDivElement | null>, required: true},
382382
disableAnimations: { type: Boolean, default: false },
383383
enabled: { type: Boolean, default: true },
384384
spotlightRadius: { type: Number, default: DEFAULT_SPOTLIGHT_RADIUS },
@@ -539,7 +539,10 @@ const GlobalSpotlight = defineComponent({
539539
const BentoCardGrid = defineComponent({
540540
name: 'BentoCardGrid',
541541
props: {
542-
gridRef: { type: Object }
542+
gridRef: {
543+
type: Function as PropType<(el: HTMLDivElement | null) => void>,
544+
required: true
545+
}
543546
},
544547
template: `
545548
<div

0 commit comments

Comments
 (0)