+ *
+ * Content1
+ * Content2
+ *
+ *
+ * ```
*/
-export const InView = ({ children, ...props }: InViewProps) => {
- const { ref: intersectionObserverRef } = useIntersectionObserver(props);
+export const InView = ({
+ children,
+ asChild = false,
+ ...props
+}: InViewProps): JSX.Element => {
+ const InViewWrapper = asChild ? Slot : 'div';
+ const { ref: intersectionObserverRef } =
+ useIntersectionObserver