ShowIfInSessionMode
ShowIfInSessionMode(
props
):Element
Guard that only shows its children by toggling their visibility based on the current session mode.
If neither allow
nor deny
are provided, the visiblity will be based on whether or not any mode is currently being used.
props
InSessionModeProps
ReactNode
The ReactNode elements to conditionally show.
XRSessionMode | ReadonlyArray<XRSessionMode | undefined>
The session mode(s) where the children will be shown. If not provided, the children will be shown in all modes except the ones in deny
.
XRSessionMode | ReadonlyArray<XRSessionMode | undefined>
The session mode(s) where the children will be hidden.
Returns
Element