In my Vue.js application, I have implemented a custom component. My goal is for the HTML DOM children components to be able to determine whether they are contained within my component or in the main application itself. What would be the most effective approach to achieve this? I attempted using props, but since everything is nested within another application, it doesn't seem feasible.
For example: How can the si-button component identify that it is enclosed within a si-dialog? How can this information be passed to the si-button?
<si-dialog ref="siDialogChildren" name="children">
<div>
<h1>Hello children dialog!</h1>
<p>Click outside the dialog to close this dialog.</p>
</div>
<si-button id="test" type="custom" :on-click="buttonPress">
Click
</si-button>
</si-dialog>
Sincerely,
Mirijam