I can’t seem to figure out why the binding of passed in properties to a child component are not working? I referenced
Component Setup Like:
<script setup lang="ts">
export interface ContentOptions {
align?: 'start' | 'center' | 'end';
...more options
}
interface Props {
contentOptions?: ContentOptions;
...other options
}
const props = withDefaults(defineProps<Props>(), {
contentOptions: () => ({
align: 'end',
... other options
}),
});
</script>
<template>
<OtherComponents>
<PassPropsToThisComponent v-bind="props.contentOptions>
...stuff
</PassPropsToThisComponent>
</OtherComponents>
</template
Using Component Like:
<PassPropsToThisComponent :contentOptions="{ align: 'start', ...more options } />
Referencing the Vue documentation here