From 280d03dfc4bfbff190ea699366d56d5e039fa53c Mon Sep 17 00:00:00 2001 From: Alex Totolici <35605914+toto1384@users.noreply.github.com> Date: Fri, 1 Dec 2023 12:23:49 +0200 Subject: [PATCH 1/2] Update index.tsx --- packages/react-sticky-box/src/index.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/react-sticky-box/src/index.tsx b/packages/react-sticky-box/src/index.tsx index 7ab6ccb..c8683ba 100644 --- a/packages/react-sticky-box/src/index.tsx +++ b/packages/react-sticky-box/src/index.tsx @@ -1,4 +1,4 @@ -import {ComponentProps, useEffect, useState} from "react"; +import React, {ComponentProps, useEffect, useState} from "react"; const getScrollParent = (node: HTMLElement) => { let parent: HTMLElement | null = node; @@ -409,11 +409,7 @@ const StickyBox = (props: StickyBoxCompProps) => { const {offsetTop, offsetBottom, bottom, children, className, style} = props; const ref = useStickyBox({offsetTop, offsetBottom, bottom}); - return ( -
- {children} -
- ); + return React.createElement('div',{className, style, ref, children}) }; export default StickyBox; From eef4a4c1bcc607ae6e9e7f81a5a0a1b75593c9da Mon Sep 17 00:00:00 2001 From: Alex Totolici <35605914+toto1384@users.noreply.github.com> Date: Fri, 1 Dec 2023 12:28:57 +0200 Subject: [PATCH 2/2] Update package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index c873669..39e637d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "private": true, + "name":"react-sticky-box", "workspaces": [ "packages/*" ],